HP C/iX Reference Manual (31506-90011)
96 Chapter6
Statements
The continue Statement
The continue Statement
The continue statement is used to transfer control during the execution of an iteration
statement.
Syntax
continue;
Description
The continue statement unconditionally transfers control to the loop-continuation portion
of the most tightly enclosing iteration statement. You cannot use the continue statement
without an enclosing for, while, or do statement.
In a while statement, a continue causes a branch to the code that tests the controlling
expression.
In a do statement, a continue statement causes a branch to the code that tests the
controlling expression.
In a for statement, a continue causes a branch to the code that evaluates the increment
expression.
Example
for (i=0; i<=6; i++)
if(i==3)
continue;
else
printf("%d\n",i);
This example prints:
0
1
2
4
5
6