Intel® Fortran Compiler 18.0 Developer Guide and Reference

Program Control Statements

The following table lists statements that affect program control.

Statements

Name

Description

CASE

Within a SELECT CASE structure, marks a block of statements that are executed if an associated value matches the SELECT CASE expression.

CONTINUE

Often used as the target of GOTO or as the terminal statement in a DO loop; performs no operation.

CYCLE

Advances control to the end statement of a DO loop; the intervening loop statements are not executed.

DO

Marks the beginning of a loop construct. Statements through and including the ending statement may be executed repeatedly.

DO WHILE

Evaluates statements in the DO WHILE loop, through and including the ending statement, until a logical condition becomes .FALSE..

ELSE

Marks an optional branch in an IF construct.

ELSE IF

Marks an optional branch in an IF construct.

ELSEWHERE

Marks an optional branch in a WHERE construct.

END

Marks the end of a program unit.

END DO

Marks the end of a series of statements following a DO or DO WHILE statement.

END FORALL

Marks the end of a series of statements following a block FORALL statement.

END IF

Marks the end of a series of statements following a block IF statement.

END SELECT

Marks the end of a SELECT CASE statement.

END WHERE

Marks the end of a series of statements following a block WHERE statement.

EXIT

Terminates execution of a DO construct. Execution continues with the first statement that follows.

FORALL

Indicates a loop construct where the output from one iteration cannot change the input to another.

GOTO

Transfers control to a specified part of the program.

IF

Controls conditional execution of other statements.

PAUSE

Suspends program execution and, optionally, executes operating-system commands.

SELECT CASE

Transfers program control to a block of statements, determined by a controlling argument.

STOP

Terminates program execution.

WHERE

Controls conditional execution of array assignments and elemental function calls.