RecurLoop/ Documentation
RecurLoop/APIv0.2.12

if

Execute a block when its condition is true.

recurloop
if condition { ... } else { ... }

Runs the first block when the condition is true, otherwise the optional else block. Inside compiled functions, else if chains further conditions.

Example

recurloop
if count > 0 { print "ready" } else { print "empty" }

Syntax

recurloop
<condition:expr> <accepted:block> [else <rejected:block>]

Example

recurloop
if count > 0 { print count }

Arguments

  • —
  • : —
  • accepted — Code executed when the condition is true.
  • condition — An expression interpreted as true or false.
  • rejected — Optional else block executed when the condition is false.