Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Literals-Integer/EMal/literals-integer.emal
Normal file
16
Task/Literals-Integer/EMal/literals-integer.emal
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
^|
|
||||
| EMal internally uses 64 bit signed integers.
|
||||
|^
|
||||
int hex = 0xff # base16
|
||||
int oct = 0o377 # base8
|
||||
int bin = 0b11111111 # base2
|
||||
int dec = 255 # base10
|
||||
writeLine(hex)
|
||||
writeLine(oct)
|
||||
writeLine(bin)
|
||||
writeLine(dec)
|
||||
# here we check that they give the same value
|
||||
writeLine(0b1011010111 == 0o1327 and
|
||||
0o1327 == 0x2d7 and
|
||||
0x2d7 == 727 and
|
||||
727 == 0b1011010111)
|
||||
Loading…
Add table
Add a link
Reference in a new issue