Infinity: Difference between revisions

Content added Content deleted
(Added PicoLisp)
m (→‎[[Infinity#ALGOL 68]]: fix pre tag and some wp:links)
Line 81: Line 81:


=={{header|ALGOL 68}}==
=={{header|ALGOL 68}}==
[[ALGOL 68R]] (from [http://en.wikipedia.org/wiki/Royal_Radar_Establishment Royal Radar Establishment])
[[ALGOL 68R]] (from [[wp:Royal_Radar_Establishment|Royal Radar Establishment]]) has an ''infinity'' variable as part of the ''standard prelude'', on the [[wp:ICT 1900|ICL 1900 Series]] [[wp:mainframe|mainframe]]s the value of ''infinity'' is 5.79860446188₁₀76 (the same as ''max float'').
has an ''infinity'' variable as part of the
''standard prelude'', on the [[ICL 1900 Series]] [[mainframe]]s
the value of ''infinity'' is 5.79860446188₁₀76 (the same as
''max float'').


{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
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 ±∞.


{{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]}}
ALGOL 68 does have some 7 built in
{{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}}
[[Exceptions#ALGOL_68|exceptions]], these might be used to detect exceptions
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 ±∞.
during transput, and so <u>if</u> the underlying hardware <u>does</u> support

&infin;, then it would be detected with a ''on value error'' while
printing and if ''mended'' would appear as a field full of ''error char''.
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 &infin;, 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));
<lang algol68>printf(($"max int: "gl$,max int));
Line 103: Line 97:
printf(($"long max real: "gl$,long max real));
printf(($"long max real: "gl$,long max real));
printf(($"long long max real: "gl$,long long max real));
printf(($"long long max real: "gl$,long long max real));
printf(($"error char: "gl$,error char))</lang>[[ALGOL 68G]]-mk14.1 output:<lang algol68>max int: +2147483647
printf(($"error char: "gl$,error char))</lang>
Output:
<pre>
max int: +2147483647
long max int: +99999999999999999999999999999999999
long max int: +99999999999999999999999999999999999
long long max int: +9999999999999999999999999999999999999999999999999999999999999999999999
long long max int: +9999999999999999999999999999999999999999999999999999999999999999999999
Line 109: Line 106:
long max real: +1.000000000000000000000000e+999999
long max real: +1.000000000000000000000000e+999999
long long max real: +1.00000000000000000000000000000000000000000000000000000000000e+999999
long long max real: +1.00000000000000000000000000000000000000000000000000000000000e+999999
error char: *</lang>
error char: *
</pre>


=={{header|Argile}}==
=={{header|Argile}}==