📄️ Statements
irScript statements are the core control-flow structures of the language; every statement ends with a semicolon.
📄️ Statement blocks
irScript statement blocks, enclosed in curly braces, create a local variable declaration scope.
📄️ break
The irScript break statement immediately exits a for, while, do/while, or switch statement.
📄️ continue
The irScript continue statement skips to the next iteration of a for, do/while, or while statement.
📄️ do/while
The irScript do/while statement executes a block at least once, then repeats while its condition holds.
📄️ for
irScript's two for-loop forms: a C#-style foreach iterator over a collection, and a traditional C#-style counting loop.
📄️ if
irScript if statements support conditional branching, with an optional else clause for the unmet condition.
📄️ return
The irScript return statement exits a function and optionally specifies its return value.
📄️ switch
irScript's switch statement, with C#-like syntax and support for fall-through case statements.
📄️ throw
The irScript throw statement raises an error with a supplied expression, catchable via try/catch/finally.
📄️ try/catch/finally
irScript's try/catch/finally error handling; a caught error is implicitly typed as ScriptError.
📄️ while
irScript's while statement executes its body until the loop condition is no longer met, or a break is reached.