Contents|Index|Previous|Next

Integers

An octal integer is ‘0’ followed by zero or more of the octal digits (‘01234567’).

_as_octal = 0157255;

A decimal integer starts with a non-zero digit followed by zero or more digits (‘0123456789’).

_as_decimal = 57005;

A hexadecimal integer is ‘0x’ or ‘0X’ followed by one or more hexadecimal digits chosen from ‘0123456789abcdefABCDEF’.

_as_hex = 0xdead;

To write a negative integer, use the prefix operator ‘-’; see Operators.

_as_neg = -57005;

Additionally the suffixes K and M may be used to scale a constant by 1024 or 10242 respectively. For example, the following all refer to the same quantity:

_fourk_1 = 4K;
_fourk_2 = 4096;
_fourk_3 = 0x1000;