> IF's returning values (used like a C ternary op)
I assume this just refers to a conditional expression?
I assume this just refers to a conditional expression?
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.
x := ( y < 1 | 1 | 2 );