# 9 Intrinsic Procedures

Intrinsic procedures are functions and subroutines that are included in the Fortran 95/90 library. There are four classes of these intrinsic procedures, as follows:

- Elemental procedures

  These procedures have scalar dummy arguments that can be called with scalar or array actual arguments. There are many elemental intrinsic functions and one elemental intrinsic subroutine (MVBITS).

  If the arguments are all scalar, the result is scalar. If an actual argument is array-valued, the intrinsic procedure is applied to each element of the actual argument, resulting in an array that has the same shape as the actual argument.

  If there is more than one array-valued argument, they must all have the same shape.

- Inquiry functions

  These functions have results that depend on the properties of their principal argument, not the value of the argument (the argument value can be undefined).

- Transformational functions

  These functions have one or more array-valued dummy or actual arguments, an array result, or both. The intrinsic function is not applied elementally to an array-valued actual argument; instead it changes (transforms) the argument array into another array.

- Nonelemental procedures

  These procedures must be called with only scalar arguments; they return scalar results. All subroutines (except MVBITS) are nonelemental.

Intrinsic procedures are invoked the same way as other procedures, and follow the same rules of argument association.

The intrinsic procedures have generic (or common) names, and many of the intrinsic functions have specific names. (Some intrinsic functions are both generic and specific.)

In general, generic functions accept arguments of more than one data type; the data type of the result is the same as that of the arguments in the function reference. For elemental functions with more than one argument, all arguments must be of the same type (except for the function MERGE).

When an intrinsic function is passed as an actual argument to a procedure, its specific name must be used, and when called, its arguments must be scalar. Some specific intrinsic functions are not allowed as actual arguments in all circumstances.

Table 9-1 lists specific functions that cannot be passed as actual arguments.

Table 9-1 Functions Not Allowed as Actual Arguments

AIMAX0 | EOF | JIDINT | MAX0
AIMIN0 | FLOAT | JIFIX | MAX1
AJMAX0 | FLOATI | JINT | MIN0
AJMIN0 | FLOATJ | JMAX0 | MIN1
AKMAX0 | FLOATK | JMAX1 | MULT_HIGH
AKMIN0 | ICHAR | JMIN0 | MY_PROCESSOR
AMAX0 | IDINT | JMIN1 | NUMBER_OF_PROCESSORS
AMAX1 | IFIX | KIDINT | NWORKERS
AMIN0 | IIDINT | KIFIX | PROCESSORS_SHAPE
AMIN1 | IIFIX | KINT | QCMPLX
CHAR | IINT | KIQINT | QEXT
CMPLX | IMAX0 | KIQNNT | QEXTD
DBLE | IMAX1 | KMAX0 | QMAX1
DBLEQ | IMIN0 | KMAX1 | QMIN1
DCMPLX | IMIN1 | KMIN0 | QREAL
DFLOTI | INT | KMIN1 | RAN
DFLOTJ | INT_PTR_KIND | LGE | REAL
DFLOTK | INT1 | LGT | SECNDS
DMAX1 | INT2 | LLE | SIZEOF
DMIN1 | INT4 | LLT | SNGL
DPROD | INT8 | LOC | SNGLQ
DREAL | JFIX | MALLOC | ZEXT

This chapter contains information on the following topics:

- Argument keywords in intrinsic procedures (Section 9.1)
- Overview of intrinsic procedures (Section 9.2)
- Descriptions of intrinsic procedures (Section 9.3)

For More Information:

- On the rules of argument association, see Section 8.8.
- On the MERGE intrinsic function, see Section 9.3.98.
- On optional arguments, see Section 8.8.1.
- On Compaq Fortran numeric data format, see your user manual or programmer's guide.
- On data representation models, see Appendix D.
- On generic intrinsic procedures, see Section 8.8.8.1.
- On elemental references to intrinsic procedures, see Section 8.8.8.2.

Previous Page Next Page Table of Contents