Intel® Fortran Compiler 18.0 Developer Guide and Reference

Execution Control

Execution of a program consists of the asynchronous execution of the program in a fixed number of one or more of its images. Each image has its own execution environment, including floating-point status, a set of data objects, input/output units, and procedure pointers.

A program normally executes statements in the order in which they are written. Executable control constructs and statements, and procedure invocations, modify this normal execution by transferring control to another statement in the program, or by selecting blocks (groups) of constructs and statements for execution or repetition.

Procedures may be invoked by the CALL statement (subroutine), during expression evaluation (function), or as part of data definition and handling (user-defined operators and FINAL procedures). There are many ways to define a procedure: for example, external, internal, contained, type-bound, defined operator or assignment, and module. All procedures have one entry point; procedures usually return to their caller.

The control constructs ASSOCIATE, CASE, DO, IF, and SELECT TYPE contain blocks and can be named. The name must be a unique identifier in the scoping unit, and must appear on the initial line and terminal line of the construct. On the initial line, the name is separated from the statement keyword by a colon (:).

A block can contain any executable Fortran statement except an END statement. You can transfer control out of a block, but you cannot transfer control into another block.

DO loops cannot partially overlap blocks. The DO statement and its terminal statement must appear together in a statement block.

The following are execution control statements or constructs: