Literals/Integer: Difference between revisions
Content deleted Content added
m →{{header|Java}}: L or l is optional for long literals. |
Modula-3 |
||
Line 114: | Line 114: | ||
727 727 727 727 |
727 727 727 727 |
||
</pre> |
</pre> |
||
=={{header|Modula-3}}== |
|||
All numbers 2 to 16 are allowed to be bases. |
|||
<lang modula3>MODULE Literals EXPORTS Main; |
|||
IMPORT IO, Fmt; |
|||
BEGIN |
|||
IO.PutInt(16_2D7); |
|||
IO.Put(" "); |
|||
IO.PutInt(10_727); |
|||
IO.Put(" "); |
|||
IO.PutInt(8_1327); |
|||
IO.Put(" "); |
|||
IO.PutInt(2_1011010111); |
|||
IO.Put("\n"); |
|||
END Literals.</lang> |
|||
The <code>Fmt</code> module also has optional arguments in it's integer functions for setting the base. |
|||
=={{header|Haskell}}== |
=={{header|Haskell}}== |