• Reference Guide

Numeric Constants

Integer Numbers

A sequence of digits without spaces is interpreted as an integer number constant. If the constant is less or equal to 2 147 483 647 (the maximum value of the type Int), the value is of the type Int. If it is less or equal to the maximum value of the type Int64, it is a value of that type. In other cases, the constant is interpreted as a Real value (however, some precision of the constant can be lost).

Other than Decimal Notation Numbers

In Enki, numbers can also be expressed in binary, octal and hexadecimal notation. The base of the notation is indicated by writing a leading zero followed by a character as follows:
0b or 0B
a binary number (e.g. 0b1001 is 9 decimal).
0o or 0O
an octal number (e.g. 0o11 is 9 decimal).
0x or 0X
a hexadecimal number (e.g.. 0x1F is 31 decimal). For writing hexadecimal digits, both upper-case AF and lower-case af characters can be used.
Constants written this way are of the type Dword, or Qword if the number exceeds the maximum value of the type Dword.

Real Numbers

If a numeric constant contains a dot, it is always interpreted as a real number – the type Real. The constant 10.0 therefore represents the number ten as a Real number.
Real numbers can also be written in a semi-logarithmic form. This is achieved by appending the letter e or E to the numeric constant followed by a decimal exponent. Therefore, 1.5e6 signifies 1.5×106 or 1 500 000; 5e-2 signifies 5×10–2 or 0.05