Data Types

Polar Script supports the following data types:

Data typeNotesDefault
DoubleFor 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
DecimalFor 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
LongInteger 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
LongLongInteger 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
StringUnicode texts with virtually unlimited length.""
BooleanA boolean, either True or False.False
DateA Date/Time#1899-12-30#
ObjectAny object, but not basic types as listed above or arrays.Nothing
VariantAny type of variable, either objects, arrays or basic types.Empty
ArrayAn 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 typeMeaningDetect
EmptyA variant variable is not yet initialised. Behaves as default value for each type when used as such.IsEmpty(pVariable)
MissingA Variant parameter is omitted and no default value was specified. Behaves as default value for each type when used as such.IsMissing(pVariable)
VoidA ?-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)
NothingAn empty object. Is also the default for object variables. Please be aware that IsObject(Nothing) returns True.IsNothing(pVariable)
NULLA 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)

See also: