3 ms·
Actually, I used Algol 68 at uni, while reading EE. That was due to the lecturer tasked with giving us some computing instruction choosing that language. This
by dfawcus 2y ago
Actually, I used Algol 68 at uni, while reading EE. That was due to the lecturer tasked with giving us some computing instruction choosing that language. This would have been in around 87 or 88.
I actually quite liked it, finding it easy to translate to / from C and A68, but that was mainly because he only described a subset (incl. nested functions), and didn't even describe REF.
So we got exposed to all of the various FOR/WHILE/DO/OD thing, IF's returning values (used like a C ternary op), etc. Some folks went off and acquired reference books for the language, and explored other areas. I never did as at the time I was comfortable with the K&R C compiler on our dept. unix machines.
The real paint point with A68 there was that the compiler was a batch submission one, took quite some time to run, and the machine doing the work was quite overloaded.
- PittleyDunkin 2y ago> IF's returning values (used like a C ternary op) I assume this just refers to a conditional expression?
- dfawcus 2y agoAs I recall, it was something like: INT x; x := IF y < 1 THEN 1 ELSE 2 FI; Possibly one could also place various statements inside the THEN and ELSE sections, as long as they ended with an expression. I've a vague impression about that, but can't properly recall. There was also a short form available, but we were never actually told that, although some folks found it themselves from reference books.
- Taniwha 2y agoA68 also allowed brackets interchangeably with the key words, you could say: x := ( y < 1 | 1 | 2 );