Fortran statement support

The Fortran statements supported within the Arm Fortran Compiler, are:


Statement

Language
standard*

Brief description

ACCEPT

F77

Causes formatted input to be read on standard input.

ALLOCATABLE

F90

Specifies that an array with fixed rank, but deferred shape, is available for a future ALLOCATE statement.

ALLOCATE

F90

Allocates storage for each allocatable array, pointer object, or pointer-based variable that appears in the statements; declares storage for deferred-shape arrays.

Note: Arm Fortran Compiler does not initialize arrays or variables with zeros. It is best practice to not assume that arrays are filled with zeros when created.

ASSIGN

F77

Assigns a statement label to a variable.

Note: This statement is a deleted feature in the Fortran standard, but remains supported in the Arm Fortran Compiler.

ASSOCIATE

F2003

Associates a name either with a variable or with the value of an expression, while in a block.

ASYNCHRONOUS

F77

Warns the compiler that incorrect results may occur for optimizations involving movement of code across wait statements, or statements that cause wait operations.

BACKSPACE

F77

Positions the file that is connected to the specified unit, to before the preceding record.

BLOCK DATA

F77

Introduces several non-executable statements that initialize data values in COMMON tables.

BYTE

F77 ext

Establishes the data type of a variable by explicitly attaching the name of a variable to a 1-byte integer, overriding implied data typing.

CALL

F77

Transfers control to a subroutine.

CASE

F90

Begins a case-statement-block portion of a SELECT CASE statement.

CHARACTER

F90

Establishes the data type of a variable by explicitly attaching the name of a variable to a character data type, overriding the implied data typing.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

CLOSE

F77

Terminates the connection of the specified file to a unit.

COMMON

F77

Defines global blocks of storage that are either sequential or non-sequential.
May be either static or dynamic form.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

COMPLEX

F90

Establishes the data type of a variable by explicitly attaching the name of a variable to a complex data type, overriding implied data typing.

CONTAINS

F90

F2003

Precedes a subprogram, a function or subroutine, and indicates the presence of the subroutine or function definition inside a main program, external subprogram, or module subprogram.

In F2003, a CONTAINS statement can also appear in a derived type immediately before any type-bound procedure definitions.

CONTINUE

F77

Passes control to the next statement.

CYCLE

F90

Interrupts a DO construct execution and continues with the next iteration of the loop.

DATA

F77

Assigns initial values to variables before execution.

Note: This statement amongst execution statements has been marked as obsolescent. This functionality is redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

DEALLOCATE

F90

Causes the memory that is allocated for each pointer-based variable or allocatable array that appears in the statement to be deallocated (freed).
Also may be used to deallocate storage for deferred-shape arrays.

DECODE

F77 ext

Transfers data between variables or arrays in internal storage and translates that data from character form to internal form, according to format specifiers.

DIMENSION

F90

Defines the number of dimensions in an array and the number of elements in each dimension.

DO (Iterative)

F90

Introduces an iterative loop and specifies the loop control index and parameters.

Note: Label form DO statements have been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

DO WHILE

F77

Introduces a logical DO loop and specifies the loop control expression.

DOUBLE COMPLEX

F77

Establishes the data type of a variable by explicitly attaching the name of a variable to a double complex data type. This overrides the implied data typing.

DOUBLE PRECISION

F90

Establishes the data type of a variable by explicitly attaching the name of a variable to a double precision data type, overriding implied data typing.

ELSE

F77

Begins an ELSE block of an IF block, and encloses a series of statements that are conditionally executed.

ELSE IF

F77

Begins an ELSE IF block of an IF block series, and encloses statements that are conditionally executed.

ELSE WHERE

F90

The portion of the WHERE ELSE WHERE construct that permits conditional masked assignments to the elements of an array, or to a scalar, zero-dimensional array.

ENCODE

F77 ext

Transfers data between variables or arrays in internal storage and translates that data from internal to character form, according to format specifiers.

END

F77

Terminates a segment of a Fortran program.

END ASSOCIATE

F2003

Terminates an ASSOCIATE block.

END DO

F77

Terminates a DO or DO WHILE loop.

END FILE

F77

Writes an ENDFILE record to the files.

END IF

F77

Terminates an IF ELSE or ELSE IF block.

END MAP

F77 ext

Terminates a MAP declaration.

END SELECT

F90

Terminates a SELECT declaration.

END STRUCTURE

F77 ext

Terminates a STRUCTURE declaration.

END UNION

F77 ext

Terminates a UNION declaration.

END WHERE

F90

Terminates a WHERE ELSE WHERE construct.

ENTRY

F77

Allows a subroutine or function to have more than one entry point.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

EQUIVALENCE

F77

Allows two or more named regions of data memory to share the same start address.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

EXIT

F90

Interrupts a DO construct execution and continues with the next statement after the loop.

EXTERNAL

F77

Identifies a symbolic name as an external or dummy procedure which can then be used as an argument.

FINAL

F2003

Specifies a final subroutine inside a derived type.

FORALL

F95

Provides, as a statement or construct, a parallel mechanism to assign values to the elements of an array.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

FORMAT

F77

Specifies format requirements for input or output.

FUNCTION

F77

Introduces a program unit; all the statements that follow apply to the function itself.

GENERIC

F2003

Specifies a generic type-bound procedure inside a derived type.

GOTO (Assigned)

F77

Transfers control so that the statement identified by the statement label is executed next.

Note: This statement is a deleted feature in the Fortran standard, but remains supported in the Arm Fortran Compiler.

GOTO (Computed)

F77

Transfers control to one of a list of labels, according to the value of an expression.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

GOTO (Unconditional)

F77

Unconditionally transfers control to the statement with the label label, which must be declared within the code of the program unit containing the GOTO statement, and must be unique within that program unit.

IF (Arithmetic)

F77

Transfers control to one of three labeled statements, depending on the value of the arithmetic expression.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

IF (Block)

F77

Consists of a series of statements that are conditionally executed.

IF (Logical)

F77

Executes or does not execute a statement based on the value of a logical expression.

IMPLICIT

F77

Redefines the implied data type of symbolic names from their initial letter, overriding implied data types.

IMPORT

F2003

Gives access to the named entities of the containing scope.

INCLUDE

F77 ext

Directs the compiler to start reading from another file.

INQUIRE

F77

Inquires about the current properties of a particular file or the current connections of a particular unit.

INTEGER

F77

Establishes the data type of a variable by explicitly attaching the name of a variable to an integer data type, overriding implied data types.

INTENT

F90

Specifies intended use of a dummy argument, but may not be used in a specification statement of a main program.

INTERFACE

F90

Makes an implicit procedure an explicit procedure where the dummy parameters and procedure type are known to the calling module; Also overloads a procedure name.

INTRINSIC

F77

Identifies a symbolic name as an intrinsic function and allows it to be used as an actual argument.

LOGICAL

F77

Establishes the data type of a variable by explicitly attaching the name of a variable to a logical data type, overriding implied data types.

MAP

F77 ext

Designates each unique field or group of fields within a UNION statement.

MODULE

F90

Specifies the entry point for a Fortran 90, or Fortran 95, module program unit. A module defines a host environment of scope of the module, and may contain subprograms that are in the same scoping unit.

NAMELIST

F90

Allows the definition of NAMELIST groups for NAMELIST-directed I/O.

NULLIFY

F90

Disassociates a pointer from its target.

OPEN

F77

Connects an existing file to a unit, creates and connects a file to a unit, creates a file that is pre-connected, or changes certain specifiers of a connection between a file and a unit.

OPTIONAL

F90

Specifies dummy arguments that may be omitted or that are optional.

OPTIONS

F77 ext

Confirms or overrides certain compiler command-line options.

PARAMETER

F77

Gives a symbolic name to a constant.

PAUSE

F77

Stops program execution.

Note: This statement is a deleted feature in the Fortran standard, but remains supported in the Arm Fortran Compiler.

POINTER

F90

Provides a means for declaring pointers.

PRINT

F77

Transfers data to the standard output device from the items that are specified in the output list and format specification.

PRIVATE

F90

F2003

Specifies that entities that are defined in a module are not accessible outside of the module. PRIVATE can also appear inside a derived type to disallow access to its data components outside the defining module.

In F2003, a PRIVATE statement may appear after CONTAINS statement of the type, to disallow access to type-bound procedures outside the defining module.

PROCEDURE

F2003

Specifies a type-bound procedure, procedure pointer, module procedure, dummy procedure, intrinsic procedure, or an external procedure.

PROGRAM

F77

Specifies the entry point for a linked Fortran program.

PROTECTED

F2003

Protects a module variable against modification from outside the module in which it was declared.

PUBLIC

F90

Specifies that entities that are defined in a module are accessible outside of the module.

PURE

F95

Indicates that a function or subroutine has no side effects.

READ

F77

Transfers data from the standard input device to the items specified in the input and format specifications.

REAL

F90

Establishes the data type of a variable by explicitly attaching the name of a variable to a data type, overriding implied data types.

RECORD

F77 ext

A VAX Fortran extension, defines a user-defined aggregate data item.

RECURSIVE

F90

Indicates whether a function or subroutine may call itself recursively.

RETURN

F77

When used in a subroutine, causes a return to the statement following a CALL.
When used in a function, returns to the relevant arithmetic expression.

Note: This statement has been marked as obsolescent. Obsolescent statements are now redundant and may be removed from future standards. This statement remains supported in the Arm Fortran Compiler.

REWIND

F77

Positions the file at the start. The statement has no effect if the file is already positioned at the start, or if the file is connected but does not exist.

SAVE

F77

Retains the definition status of an entity after a RETURN or END statement in a subroutine or function that has been executed.

SELECT CASE

F90

Begins a CASE construct.

SELECT TYPE

F2003

Provides the capability to execute alternative code depending on the dynamic type of a polymorphic entity, and to gain access to dynamic parts. The alternative code is selected using the TYPE IS statement for a specific dynamic type, or the CLASS IS statement for a specific type (and all its type extensions). Use the optional class default statement to specify all other dynamic types that do not match a specified TYPE IS or CLASS IS statement. Like the CASE construct, the code consists of a several blocks and, at most, one is selected for execution.

SEQUENCE

F90

A derived type qualifier that specifies the ordering of the storage that is associated with the derived type. This statement specifies storage for use with COMMON and EQUIVALENCE statements.

STOP

F77

Stops program execution and precludes any further execution of the program.

STRUCTURE

F77 ext

A VAX extension to FORTRAN 77 that defines an aggregate data type.

SUBROUTINE

F77

Introduces a subprogram unit.

TARGET

F90

Specifies that a data type may be the object of a pointer variable (for example, pointed to by a pointer variable). Types that do not have the TARGET attribute cannot be the target of a pointer variable.

THEN

F77

Part of an IF block statement, surrounds a series of statements that are conditionally executed.

TYPE

F90

F2003

Begins a derived type data specification or declares variables of a specified user-defined type.

Use the optional EXTENDS statement with TYPE to indicate a type extension in F2003.

UNION

F77 ext

A multi-statement declaration defining a data area that can be shared intermittently during program execution by one or more fields or groups of fields.

USE

F90

Gives a program unit access to the public entities or to the named entities in the specified module.

VOLATILE

F77 ext

Inhibits all optimizations on the variables, arrays and common blocks that it identifies.

WAIT

F2003

Performs a wait operation for specified pending asynchronous data transfer operations.

WHERE

F90

Permits masked assignments to the elements of an array or to a scalar, zero-dimensional array.

WRITE

F77

Transfers data to the standard output device from the items that are specified in the output list and format specification.

* See WG5 Fortran Standards


Note: Language standards denoted indicate the standard they were introduced in or the standard they were last significantly changed.

Related information