Contents
Table of Contents |
---|
...
Code Block |
---|
for(<variable_definition> in #{array}){ Instruction1; ... InstructionN; } |
Examples
Example 1 (standard form)
...
Code Block |
---|
for(string user in watchers){ print(user); } |
While Statement
The while statement offers support for repeated executions. This form evaluates the condition first and then executes the instructions in the body.
...
- inside a loop (for, while): when encountering the break, the execution of the loop is terminated and the control is transfered to transferred to the statement that follows the loop;
- in switch statements: when a case is followed by a break, it does not execute subsequent cases and control is transferred out of the switch statement.
...