Contents Up << >>

Next statements

The next statement may only appear within the statement list of a loop statement and is used to skip to the next iteration. The syntax follows the rule: If the WHEN part appears, then it specifies under what condition the current iteration should be aborted. If the condition evaluates to true, then the iteration is aborted; otherwise, execution continues with the next statement in sequence. If the WHEN part does not appear, then it will unconditionally abort the current iteration. Since loop statements can contain other loop statements, the label part names which loop statement iteration should be aborted. The label should correspond to the label of the loop iteration to be aborted. If the label does not appear, then the iteration of the immediately enclosing loop is aborted.