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, 2, -10
-- binary
0b101, 0B101
-- octal
0o1, 0O1, 0o52, 0O752
-- hex
0x1, 0X1, 0x2a, 0X2A, 0xff
Integers in Erlang:
1, 2, -10
-- binary
2#101, 2#10
-- octal
8#1, 8#52, 8#752
-- hex
16#01, 16#2a, 16#2A, 16#ff
当前内容版权归 hamler-lang 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 hamler-lang .