Control flow
If / elseif / else
One chain, one end;.
elseif is a single word. I do not do “else if”. That would be two thoughts.
define num x is 50;
if x sameas 40 or x sameas 30;
showln true;
elseif x greaterthan 60 and x lessthan 70;
showln true;
else;
showln false;
end;
Shape
- if condition
; - zero or more elseif branches
- optional else; — the fallback, for when nobody was right
- closing end;
You can return from inside a function’s if-chain.
Nested conditions each need their own end;. Manners.