2 ms·
As 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 s
by dfawcus 2y ago
As 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 );