HP Fortran Programmer's Reference (September 2007)

Execution control
Flow control statements
Chapter 6146
Flow control statements
Flow control statements alter the normal flow of program execution or the execution logic of a
control construct. For example, the GO TO statement can be used to transfer control to another
statement within a program unit, and the EXIT statement can terminate execution of a DO
construct.
This section describes the operations performed by the following flow control statements:
CONTINUE statement
CYCLE statement
EXIT statement
Assigned GO TO statement
Computed GO TO statement
Unconditional GO TO statement
Arithmetic IF statement
Logical IF statement
PAUSE statement
STOP statement
For additional information about these statements, see Chapter 10, “HP Fortran Statements.
CONTINUE statement
The CONTINUE statement has no effect on program execution. It is generally used to mark a
place for a statement label, especially when it occurs as the terminal statement of a
FORTRAN 77-style DO loop.
Syntax
CONTINUE
Execution logic
No action occurs.
Example
! find the 50th triangular number
triangular_num = 0
DO 10 i = 1, 50