(Corresponds to Section 15.10 of ANSI X3.9-1978 FORTRAN 77.)
The GNU Fortran language adds various functions, subroutines, types, and arguments to the set of intrinsic functions in ANSI FORTRAN 77. The complete set of intrinsics supported by the GNU Fortran language is described below.
Note that a name is not treated as that of an intrinsic if it is
specified in an EXTERNAL
statement in the same program unit;
if a command-line option is used to disable the groups to which
the intrinsic belongs; or if the intrinsic is not named in an
INTRINSIC
statement and a command-line option is used to
hide the groups to which the intrinsic belongs.
So, it is recommended that any reference in a program unit to
an intrinsic procedure that is not a standard FORTRAN 77
intrinsic be accompanied by an appropriate INTRINSIC
statement in that program unit.
This sort of defensive programming makes it more
likely that an implementation will issue a diagnostic rather
than generate incorrect code for such a reference.
The terminology used below is based on that of the Fortran 90 standard, so that the text may be more concise and accurate:
OPTIONAL
means the argument may be omitted.
A-1, A-2, ..., A-n
means more than one argument
(generally named A
) may be specified.
scalar
means the argument must not be an array (must
be a variable or array element, or perhaps a constant if expressions
are permitted).
DIMENSION(4)
means the argument must be an array having 4 elements.
INTENT(IN)
means the argument must be an expression
(such as a constant or a variable that is defined upon invocation
of the intrinsic).
INTENT(OUT)
means the argument must be definable by the
invocation of the intrinsic (that is, must not be a constant nor
an expression involving operators other than array reference and
substring reference).
INTENT(INOUT)
means the argument must be defined prior to,
and definable by, invocation of the intrinsic (a combination of
the requirements of INTENT(IN)
and INTENT(OUT)
.
KIND
.
COMPLEX(KIND=1)
value.
INTEGER
value truncated
to whole number (archaic).
INTEGER
value rounded
to nearest whole number (archaic).
INTEGER
value truncated
to whole number.
INTEGER(KIND=6)
value
truncated to whole number.
INTEGER(KIND=2)
value
truncated to whole number.
INTEGER(KIND=1)
(archaic).
INTEGER
value rounded
to nearest whole number.
REAL(KIND=1)
.
INTEGER(KIND=6)
value
truncated to whole number.