0
4.4
FALSE
TRUE
TRUE
TRUE
TRUE
FALSE
(the
UPB t[2:]
is 5
TRUE
TRUE
TRUE
TRUE
. It is inadvisable to created compuound
conditions with this sort of complexity simply because the condition
is so difficult to understand. You should particularly avoid compound
conditions with NOT
in front of the various parts.
FALSE
TRUE
4 <= 2
a <= b OR b <= c
x /= y AND x /= z
IF x < pi THEN print("Yes") ELSE print("No") FI
FOR i TO 96 DO print(i*3); IF i MOD 16 = 0 THEN print(newline) FI OD
OREL
is only elaborated if
the first yields FALSE
.
PROGRAM ex4 7 CONTEXT VOID USE standard BEGIN INT a = 3, b = 5, c = 4; IF IF a > b THEN TRUE ELSE b > c FI THEN print("Ok") ELSE print("Wrong") FI END FINISH
p
must yield
INT
, not BOOL
.
PROGRAM ex4 9 CONTEXT VOID USE standard CASE SIGN x + 2 IN print("x < 0.0"), print("x = 0.0"), print("x > 0.0") ESAC FINISH
TRUE
and
FALSE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
THEN
. Also replace the
ESAC
with FI
.
TFTFTFTFTF
IF m < 10 THEN print("Units") ELIF m < 100 THEN print("Tens") ELIF m < 1000 THEN print("Hundreds") ELSE print("Too big") FI
print((card|"Ace","two","three", "four","five","six", "seven","eight","nine", "ten","Jack","Queen", "King"))
Sian Mountbatten 2012-01-19