Literals/Integer: Difference between revisions

m
→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
Line 1,542:
 
=={{header|Phix}}==
{{libheader|Phix/basics}}
Phix supports more bases and number formats than average. Standard decimals and hexadecimals are eg 255=#FF.
For hexadecimal numbers you can use upper or lower case for digits above 9 (A..F or a..f).<br>
Line 1,557 ⟶ 1,558:
In the 64-bit version the limits of integers are -4,611,686,018,427,387,904 to +4,611,686,018,427,387,903. Offhand I don't know
the exact highest integer an 80-bit float can hold, but the limits should all be 512* the values given above for 32-bit.<br>
The included bigatommpfr/gmp library allows working with extremely large integers with arbitrary precision, butvery obviously will be somewhat slower than using native integers/atomsefficiently.
 
<lang Phix>?{65,#41,'A',scanf("55","%d"),0o10,0(7)11}</lang>
<!--<lang Phix>-->
<span style="color: #0000FF;">?{</span><span style="color: #000000;">65</span><span style="color: #0000FF;">,</span><span style="color: #000000;">#41</span><span style="color: #0000FF;">,</span><span style="color: #008000;">'A'</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">scanf</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"55"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%d"</span><span style="color: #0000FF;">),</span><span style="color: #000000;">0o10</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0</span><span style="color: #0000FF;">(</span><span style="color: #000000;">7</span><span style="color: #0000FF;">)</span><span style="color: #000000;">11</span><span style="color: #0000FF;">}</span>
<!--</lang>-->
 
{{out}}
<pre>
7,822

edits