FORTRAN 77 Language Reference

Usage of Pointers

Normal use of pointer-based variables involves the following steps. The first two steps can be in either order.

  1. Define the pairing of the pointer-based variable and the pointer in a POINTER statement.

  2. Define the type of the pointer-based variable.

    The pointer itself is integer type and should not appear in a type declaration.

  3. Set the pointer to the address of an area of memory that has the appropriate size and type.

    You do not normally do anything else explicitly with the pointer.

  4. Reference the pointer-based variable.

    Just use the pointer-based variable in normal FORTRAN statements--the address of that variable is always from its associated pointer.