AngelScript
 
Loading...
Searching...
No Matches
Primitives

void

void is not really a data type, more like lack of data type. It can only be used to tell the compiler that a function doesn't return any data.

bool

bool is a boolean type with only two possible values: true or false. The keywords true and false are constants of type bool that can be used as such in expressions.

Integer numbers

typemin valuemax value
int8 -128127
int16 -32,76832,767
int -2,147,483,6482,147,483,647
int64 -9,223,372,036,854,775,8089,223,372,036,854,775,807
uint8 0255
uint16065,535
uint 04,294,967,295
uint64018,446,744,073,709,551,615

As the scripting engine has been optimized for 32 bit datatypes, using the smaller variants is only recommended for accessing application specified variables. For local variables it is better to use the 32 bit variant.

int32 is an alias for int, and uint32 is an alias for uint.

Real numbers

typerange of valuessmallest positive value maximum digits
float +/- 3.402823466e+38 1.175494351e-38 6
double +/- 1.79769313486231e+308 2.22507385850720e-308 15
Note
These numbers assume the platform uses the IEEE 754 to represent floating point numbers in the CPU

Rounding errors may occur if more digits than the maximum number of digits are used.

Curiousity: Real numbers may also have the additional values of positive and negative 0 or infinite, and NaN (Not-a-Number). For float NaN is represented by the 32 bit data word 0x7fc00000.