Numeric Types

[email protected] (Michael Lazzaro) Thu, 14 Nov 2002 11:25:33 -0800
Newsgroups perl.perl6.documentation
Message-ID <[email protected]>
Does someone from internals want to take on the task of finalizing this 
list?  We need to decide if we want to support none, some, or all of 
these types/aliases.

-----

The Full List of Numeric Types

In addition to the standard int and num, there are a great number of 
other numeric types available. If your program makes use of code 
written in other languages, such as C, C++, Java, C#, etc., or if you 
want your program to make use of low-level system or library calls, you 
will frequently need to use more exact types that correspond to what 
the other language expects to see. You might also wish to use the more 
specific primitive types when you can guarantee certain bounds 
restrictions on numbers, and simply want to squeeze every unnecessary 
byte out of the generated code.

# (TEMPORARY) need final list of numeric types & any aliased names,
# assuming we don't want to support *all* of these names (tho we could)

# the base numeric type

numeric

# signed integers

int
int8     char
int16    short      short_int
int32    long       long_int
int64    quad       long_long    long_long_int

# unsigned integers

bit
uint     u_int
uint8    u_int8     u_char    byte
uint16   u_int16    u_short   u_short_int
uint32   u_int32    u_long    u_long_int
uint64   u_int64    u_quad    u_long_long    u_long_long_int

# floating point numbers

num
float
double
long_double


Each of these(?) has a matching promoted type, which starts with a 
capital letter instead of a lowercase letter (e.g. Int vs. int, Num vs. 
num.)

MikeL