Anonymous user
Arithmetic evaluation: Difference between revisions
m
→[[Arithmetic evaluation#ALGOL 68]]: fix pre tag
m (→Icon and Unicon: notes, spelling) |
m (→[[Arithmetic evaluation#ALGOL 68]]: fix pre tag) |
||
Line 21:
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - no extensions to language used}}
{{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] - A68RS has not implemented forward declarations}}
<lang algol68>INT base=10;
MODE FIXED = LONG REAL; # numbers in the format 9,999.999 #
Line 156 ⟶ 160:
);
test:(
EVAL build ast("1+1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+(1+1/15)/14)/13)/12)/11)/10)/9)/8)/7)/6)/5)/4)/3)/2")));
SKIP EXIT
index error:
printf(("Stack over flow"))
)</lang>
Output:
<pre>
</pre>
=={{header|AutoHotkey}}==
{{works with|AutoHotkey_L}}
|