Polar Script supports the following data types:
Data type | Notes | Default |
---|---|---|
Double | For floating point numbers stored in 8 bytes. -1.79769313486231E308 to -4.94065645841247E-324 (negative number). 4.94065645841247E-324 to 1.79769313486231E308 (positive number) Can be indicated by appending a # or R to a number, like: 128# | 0 |
Decimal | For floating point numbers representing real numbers (such as money) stored in 16 bytes. +/-1.0 x 10-28 to +/-7.9228 x 1028 Can be indicated by appending a @ or D to a number, like: 1D | 0 |
Long | Integer stored in 4 bytes. -2,147,483,648 to 2,147,483,647 Can be indicated by appending a % or I to a number, like: 32% | 0 |
LongLong | Integer stored in 8 bytes. -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Can be indicated by appending a & or L to a number, like: 255L# | 0 |
String | Unicode texts with virtually unlimited length. | "" |
Boolean | A boolean, either True or False. | False |
Date | A Date/Time | #1899-12-30# |
Object | Any object, but not basic types as listed above or arrays. | Nothing |
Variant | Any type of variable, either objects, arrays or basic types. | Empty |
Array | An n-dimensional array (n >= 1) with values. Arrays can be either typed or untyped (Array of Variants) | Variant(-1) |
Next to the above real data types, there is a number of pseudo data types. These are specific empty/uninitialized values for specific situations:
Data type | Meaning | Detect |
---|---|---|
Empty | A variant variable is not yet initialised. Behaves as default value for each type when used as such. | IsEmpty(pVariable) |
Missing | A Variant parameter is omitted and no default value was specified. Behaves as default value for each type when used as such. | IsMissing(pVariable) |
Void | A ?-expression on a missing object was performed, as in: lValue = lMissingObject?.Value Behaves as default value for each type when used as such. | IsVoid(pVariable) |
Nothing | An empty object. Is also the default for object variables. Please be aware that IsObject(Nothing) returns True. | IsNothing(pVariable) |
NULL | A database-null value. When used in functions or calculations may return error 'Invalid use of NULL'. Treated as an empty string when used in a concatenation. | IsNull(pVariable) IsNotNull(pVariable) |