16.3.1 References to Generic Names

Within a scoping unit, a procedure name is established to be generic if any of the following is true:

To resolve a reference to a procedure name established to be generic, the following rules are used in the order shown:

  1. If an interface block with that procedure name appears in one of the following, the reference is to the specific procedure providing that interface:

    1. The scoping unit that contains the reference

    2. A module made accessible by a USE statement in the scoping unit

    The reference must be consistent with one of the specific interfaces of the interface block.

  2. If the procedure name is specified with the INTRINSIC attribute in one of the following, the reference is to that intrinsic procedure:

    1. The same scoping unit

    2. A module made accessible by a USE statement in the scoping unit

    The reference must be consistent with the interface of that intrinsic procedure.

  3. If the following is true, the reference is resolved by applying rules 1 and 2 to the host scoping unit:

    1. The procedure name is established to be generic in the host scoping unit

    2. There is agreement between the scoping unit and the host scoping unit as to whether the procedure is a function or subroutine name.

  4. If none of the preceding rules apply, the reference must be to the generic intrinsic procedure with that name. The reference must be consistent with the interface of that intrinsic procedure.


Previous Page Next Page Table of Contents