cond | : | boolean expression |
exptrue, expfalse | : | an expression |
Returns: The type which exptrue evalutates to or the type
which expfalse evaluates to.
Synopsis: The If construct provids a short hand version of the if-then-fi construct. Every If can be re-written as follows:
> if (cond = true) then > exptrue; > else > expfalse; > fi;
Examples:
> x := 5; > If (mod(x, 2) = 0, x / 2, (x - 1) / 2);