JAL manual - language - literals

previous up next


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

   pin_a0 = low
   pin_b0 = high


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.

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


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.

   "A" -- the capital A

previous up next