If
Conditional execution. Evaluates the condition expression: if non-zero, executes the "then" body; if zero, executes the "else" body. Use comparison expressions or math to build conditions.
Block
Interactive preview is available in the interactive reader.
Parameters
condition- A numeric expression. Non-zero = true, zero = false.
then- Statement slot executed when condition is true.
else- Statement slot executed when condition is false (optional).
How it works
If evaluates the condition expression: if non-zero, executes the "then" body; if zero, executes the "else" body.