Anonymous user
Infinity: Difference between revisions
m
→[[Infinity#ALGOL 68]]: fix pre tag and some wp:links
(Added PicoLisp) |
m (→[[Infinity#ALGOL 68]]: fix pre tag and some wp:links) |
||
Line 81:
=={{header|ALGOL 68}}==
[[ALGOL 68R]] (from [
{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
the ALGOL 68 standard itself does not, and gives no way of setting a variable to ▼
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny]}}
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of '''format'''ted transput}}
▲Note: The underlying hardware may sometimes support an infinity, but the ALGOL 68 standard itself does not, and gives no way of setting a variable to either ±∞.
ALGOL 68 does have some 7 built in [[Exceptions#ALGOL_68|exceptions]], these might be used to detect exceptions during transput, and so <u>if</u> the underlying hardware <u>does</u> support ∞, then it would be detected with a ''on value error'' while printing and if ''mended'' would appear as a field full of ''error char''.
<lang algol68>printf(($"max int: "gl$,max int));
Line 103 ⟶ 97:
printf(($"long max real: "gl$,long max real));
printf(($"long long max real: "gl$,long long max real));
printf(($"error char: "gl$,error char))</lang>
Output:
<pre>
max int: +2147483647
long max int: +99999999999999999999999999999999999
long long max int: +9999999999999999999999999999999999999999999999999999999999999999999999
Line 109 ⟶ 106:
long max real: +1.000000000000000000000000e+999999
long long max real: +1.00000000000000000000000000000000000000000000000000000000000e+999999
error char: *
</pre>
=={{header|Argile}}==
|