Language reference

Keywords

The 16 exact control-flow and declaration keywords recognized by the lexer.

01

Reserved words

Keywords are lowercase and matched as complete identifiers. true and false are boolean literal tokens, documented separately.

KeywordPurpose
functionDeclare a module-level function
returnExit the current script or function
ifBegin a conditional
elseifAdd a conditional branch
elseAdd a fallback branch
forIterate a range, scalar, or matrix columns
parforRun a constrained parallel range loop
whileRepeat while a condition is true
breakExit the innermost loop
continueAdvance the innermost loop
switchSelect by scalar value
caseDefine a switch match
otherwiseDefine a switch fallback
tryBegin runtime error handling
catchHandle a runtime error
endClose a block or address the current index bound
02

Context matters

end closes blocks and also resolves the current matrix bound inside an index. break and continue are rejected outside loops, including in branches that would never execute.