if — ConditionalProgram & flow

Run a block only when a condition holds.

if <cond> { … } [else { … }]

Equivalents: Fanuc IF/GOTO · Siemens IF/ELSE

ParameterTypeDefault
condexprboolean condition

Compile-time-evaluable conditions fold away during lowering; data-dependent ones lower to the runtime interpreter.

See also: repeat · let

← all commands