Intel® Fortran Compiler

Scope

Program entities have the following kinds of scope (as shown in the table below):

  • Global

    Entities that are accessible throughout an executable program. The name of a global entity must be unique. It cannot be used to identify any other global entity in the same executable program.

  • Scoping unit (Local scope)

References to Generic Names

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

  • The scoping unit contains an interface block with that procedure name.

  • The procedure name matches the name of a generic intrinsic procedure, and it is specified with the INTRINSIC attribute in that scoping unit.

References to Specific Names

In a scoping unit, a procedure name is established to be specific if it is not established to be generic and any of the following is true:

  • The scoping unit contains an interface body with that procedure name.

  • The scoping unit contains an internal procedure, module procedure, or statement function with that procedure name.

References to Nonestablished Names

In a scoping unit, a procedure name is not established if it is not determined to be generic or specific.

To resolve a reference to a procedure name that is not established, the following rules are used in the order shown:

  1. If both of the following are true, the dummy argument is a dummy procedure and the reference is to that dummy procedure:

Argument Association

Arguments are the values passed to and from functions and subroutines through calling program argument lists.

Execution of a procedure reference establishes argument association between an actual argument and its corresponding dummy argument. The name of a dummy argument can be different from the name of its associated actual argument (if any).

Use and Host Association Overview

Use association allows the entities in a module to be accessible to other scoping units. Host association allows the entities in a host scoping unit to be accessible to an internal subprogram, a module subprogram, or submodule program.

Use association and host association remain in effect throughout the execution of the executable program.

An interface body does not access named entities by host association, but it can access entities by use association.

Subscribe to Intel® Fortran Compiler