Literals/Integer: Difference between revisions

no edit summary
m (→‎{{header|Kotlin}}: added note about underscores)
No edit summary
Line 835:
 
The digits and the radix character can both be any mixture of upper and lower case. See [http://www.gnu.org/software/emacs/manual/html_node/elisp/Integer-Basics.html GNU Elisp reference manual "Integer Basics"].
 
=={{header|EMal}}==
EasyLang's ability to use hexadecimal literals is undocumented.
<syntaxhighlight lang="emal">
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)
</syntaxhighlight>
{{out}}
<pre>
255
255
255
255
</pre>
 
=={{header|Erlang}}==
226

edits