Literals/Integer: Difference between revisions

Content added Content deleted
No edit summary
(Added Frink)
Line 365: Line 365:
727 727 727 727
727 727 727 727
</pre>
</pre>

=={{header|Frink}}==
Bases from 2 to 36 are allowed in Frink. Frink does not subscribe to the insanity that a leading 0 implies octal.
<lang frink>
100001000101111111101101\\2 // (a number in base 2)
1000_0100_0101_1111_1110_1101\\2 // (a number in base 2 with underscores for readability)
845FED\\16 // (a number in base 16... bases from 2 to 36 are allowed)
845fed\\16 // (The same number in base 16... upper or lowercase are allowed.)
845_fed\\16 // (a number in base 16 with underscores for readability)
0x845fed // (Common hexadecimal notation)
0x845FED // (Common hexadecimal notation)
0xFEED_FACE // (Hexadecimal with underscores for readability)
0b100001000101111111101101 // (Common binary notation)
0b1000_0100_0101_1111_1110_1101 // (Binary with underscores for readability)
</lang>


=={{header|Go}}==
=={{header|Go}}==