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

  1. if condition;
  2. zero or more elseif branches
  3. optional else; — the fallback, for when nobody was right
  4. closing end;

You can return from inside a function’s if-chain. Nested conditions each need their own end;. Manners.