Lahey/Fujitsu Fortran

Control Statements

Arithmetic IF (obsolescent)

Execution of an arithmetic IF statement causes evaluation of an expression followed by a transfer of control. The branch target statement identified by the first, second, or third label in the arithmetic IF statement is executed next if the value of the expression is less than zero, equal to zero, or greater than zero, respectively.

Assigned GOTO (obsolescent)

The assigned GOTO statement causes a transfer of control to the branch target statement indicated by a variable that was assigned a statement label in an ASSIGN statement. If the parenthesized list of labels is present, the variable must be one of the labels in the list.

CALL

The CALL statement invokes a subroutine and passes to it a list of arguments.

CASE

Execution of a SELECT CASE statement causes a case expression to be evaluated. The resulting value is called the case index. If the case index is in the range specified with a CASE statement's case selector, the block following the CASE statement, if any, is executed.

Computed GOTO

The computed GOTO statement causes transfer of control to one of a list of labeled statements.

CONTINUE

Execution of a CONTINUE statement has no effect.

CYCLE

The CYCLE statement curtails the execution of a single iteration of a DO loop.

DO

The DO statement begins a DO construct. A DO construct specifies the repeated execution (loop) of a sequence of executable statements or constructs.

ELSE IF

The ELSE IF statement controls conditional execution of a nested IF block in an IF construct where all previous IF expressions are false.

ELSE

The ELSE statement controls conditional execution of a block of code in an IF construct where all previous IF expressions are false.

ELSEWHERE

The ELSEWHERE statement controls conditional execution of a block of assignment statements for elements of an array for which the WHERE construct's mask expression is false.

END DO

The END DO statement ends a DO construct.

END FORALL

The END FORALL statement ends a FORALL construct.

END IF

The END IF statement ends an IF construct.

END SELECT

The END SELECT statement ends a CASE construct.

END WHERE

The END WHERE statement ends a WHERE construct.

ENTRY

The ENTRY statement permits one program unit to define multiple procedures, each with a different entry point.

EXIT

The EXIT statement terminates a DO loop.

FORALL

The FORALL statement begins a FORALL construct. The FORALL construct controls multiple assignments, masked array (WHERE) assignments, and nested FORALL constructs and statements.

GOTO

The GOTO statement transfers control to a statement identified by a label.

IF

The IF statement controls whether or not a single executable statement is executed.

IF-THEN

The IF-THEN statement begins an IF construct.

PAUSE (Obsolescent)

The PAUSE statement temporarily suspends execution of the program.

RETURN

The RETURN statement completes execution of a subroutine or function and returns control to the statement following the procedure invocation.

SELECT CASE

The SELECT CASE statement begins a CASE construct. It contains an expression that, when evaluated, produces a case index. The case index is used in the CASE construct to determine which block in a CASE construct, if any, is executed.

STOP

The STOP statement terminates execution of the program.

WHERE

The WHERE statement is used to mask the assignment of values in array assignment statements. The WHERE statement can begin a WHERE construct that contains zero or more assignment statements, or can itself contain an assignment statement.