HP 3000 Manuals

The continue Statement [ HP C/iX Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Reference Manual

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



MPE/iX 5.0 Documentation