Integers Mapping

Integers in Hamler are the same as Erlang, with unlimited size. Hamler defines Int as an alias for Integer.

Binary, octal, and hex integers in Hamler have a different syntax than Erlang.

Integers in Hamler:

  1. 1, 2, -10
  2. -- binary
  3. 0b101, 0B101
  4. -- octal
  5. 0o1, 0O1, 0o52, 0O752
  6. -- hex
  7. 0x1, 0X1, 0x2a, 0X2A, 0xff

Integers in Erlang:

  1. 1, 2, -10
  2. -- binary
  3. 2#101, 2#10
  4. -- octal
  5. 8#1, 8#52, 8#752
  6. -- hex
  7. 16#01, 16#2a, 16#2A, 16#ff