JAL manual - language - literals

previous up next


bit

The type bit has two literal values, on (true, high) and off (false, low).

examples
   pin_a0 = low
   pin_b0 = high


universal

Numerical literals can be base-2, base-10 or base-16. Base-10 is the default. An explicit base is specified by prefixing either 0b (for base-2), 0d (for base-10), 0x or 0h (for base-16).

A numerical literal has the type universal. An expression of type universal can be used whenever a byte is required, so numerical literals can be used as byte literals.

Underscores within numerical literals are ignored.

examples
   0b_0101_0101 -- a binary literal
   0x_55        -- the same value, now hex
   85           -- the same value, now decimal


ASCII

An ASCII literal is an alternative notation for the ASCII value of the indicated character. An ASCII literal can contain only a single character. An ASCII literal has the type universal.

examples
   "A" -- the capital A

previous up next