do ... while

do { statement; ... } while (int exp);

Executes a statement or statement block while the integer expression is true (nonzero). The statement or statement block is executed at least once.

if ... elseif ... else

if (int exp) { statement; ... } [elseif (int exp) { statement; ... }]* [else { statement; ... }]

Executes a statement block depending on the value of the integer expression. The statement block immediately following if is executed if the integer expression is nonzero, else the first elseif block (if any) where the integer expression is nonzero is executed. If there are no elseif blocks or if all of the elseif blocks have integer expressions that evaluated to 0 then the else block (if any) is executed.

The left and right curly brackets following if, elseif, or else are required. These brackets denote the statement block that contain the statements to execute if the given condition is met.

The elseif and else parts are optional. The parentheses around int exp are optional. There can be multiple elseif parts but only 0 or 1 else part.

The elseif part is new in v17.00. Do not use it in versions prior to v17.00.

for loops

for (statement1; int exp; statement2) { statement3; ... }

Executes statement1 if it exists, then evaluates the required integer expression. If the integer expression is nonzero, then statement3 is executed, otherwise control returns to the statement immediately following the block that contains statement3. If the statement3 block is executed, statement2 is executed immediately afterwards if it exists. The integer expression is then reevaluated and the loop continues until the integer expression evaluates to zero. statement1 and statement2 are both optional and may be single statements or statement blocks. statement3 may be a single statement or a statement block.

For example, this loop continues while the integer expression is nonzero: execute statement1, evaluate integer expression, execute statement3 block, execute statement2, evaluate integer expression, execute statement3 block, execute statement2, evaluate integer expression, ...

while

while (int exp) { statement; ... }

Continues executing a statement or statement block while the integer expression is true (nonzero).

NOTE: Excessive looping can significantly affect validation performance.