RosettaCodeData/Task/Boolean-values/Sather/boolean-values.sa

8 lines
156 B
Plaintext

v:BOOL := true; -- ok
i:INT := 1;
v := 1; -- wrong
if i then ... end; -- wrong: if requires a bool!
-- BUT
v := 1.bool; -- ok
if i.bool then ... end; -- ok