Types#
Primitive Types#
name |
description |
|---|---|
intfloat |
Numeric types. Despite their names, these are neither integers nor
floating-point numbers, but instead fixed-point numbers ranging
|
|
Long integer type. Values range from |
|
Type will be automatically determined by the parser. Cannot be used
in a ‘group declaration’, ex. |
|
Lack of a type; used to indicate a function returns nothing. |
|
General type; almost all types implicity cast to |
|
Boolean type; available values |
|
Character type. Same boundaries as |
|
Color type, used to represent color values. See:
CreateRGB. Holds a value from
|
Note
int and float are the same type to the compiler; the two names exist only for readability.
This means two functions that differ only by int vs float in their parameters have the same
signature, and declaring both is an error (Error S004: Function ... was already declared with that type signature).
Note
Character literals (ex. 'a') have the type char32, and
string literals have the type char32[]. When several overloads of a
function could accept one of these literals, the overload taking char32 / char32[] is chosen
over one taking int / int[].
void foo(char32 c) { Trace(1); }
void foo(int n) { Trace(2); }
foo('c'); // prints '1.0000'
foo(16); // prints '2.0000'
‘Constant’ types#
By adding the const modifier to a type, that type becomes “constant”. Declaring
a Variable with a constant type instead declares a Constant.
Other Types#
For documentation on existing other types, see the internal class / constant documentation.