The continue statement

A continue statement ends the current iteration of a loop. Program control is passed from the continue statement to the end of the loop body.

A continue statement has the form:

Read syntax diagramSkip visual syntax diagram>>-continue--;-------------------------------------------------><
 

A continue statement can only appear within the body of an iterative statement, such as do, for, or while.

The continue statement ends the processing of the action part of an iterative statement and moves control to the loop continuation portion of the statement. For example, if the iterative statement is a for statement, control moves to the third expression in the condition part of the statement, then to the second expression (the test) in the condition part of the statement.

Within nested statements, the continue statement ends only the current iteration of the do, for, or while statement immediately enclosing it.



[ Top of Page | Previous Page | Next Page | Contents | Index ]