Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Program Control Statements

The following table lists statements that affect program control.

Statements

Name

Description

CALL

Transfers control to a subroutine.

CASE

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

CASE DEFAULT or CLASS DEFAULT

Identifies the block of statements to be executed in a SELECT CASE construct if the value of the expression does not match any of the CASE selectors, or in a SELECT TYPE construct if the dynamic type of the selector does not match the type of any of the TYPE IS or CLASS IS statements.

CLASS IS

Within a SELECT TYPE construct, marks a block of statements that are executed if the type or dynamic type of an expression matches the type of the CLASS IS 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 CONCURRENT

Marks the beginning of a DO CONCURRENT construct. The order of executions of iterations of a DO CONCURRENT construct are indeterminate.

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. Execution of the END [PROGRAM] statement of the main program initiates normal termination for the image that executes it.

END DO

Marks the end of a series of statements in a DO, DO CONCURRENT, or DO WHILE construct.

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 or SELECT TYPE statement.

END WHERE

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

ERROR STOP

Initiates error termination for all images.

EXIT

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

FAIL_IMAGE

Causes the image that executes it to execute no more statements and stop participating in program execution.

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 the value of an expression.

SELECT TYPE

Transfers the program to a block of statements, determined by the dynamic type of an expression.

STOP

Initiates normal termination for the image that executes the statement.

TYPE IS

Within a SELECT TYPE construct, marks a block of statements that are executed if the type or dynamic type of an expression matches the type of the TYPE IS expression.

WHERE

Controls conditional execution of array assignments and elemental function calls.