Visible to Intel only — GUID: GUID-F2DF2E20-828D-48FE-B1D9-DFD9D9C474C2
Visible to Intel only — GUID: GUID-F2DF2E20-828D-48FE-B1D9-DFD9D9C474C2
Use and Host Association
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.
Example
The following example shows host and use association:
MODULE SHARE_DATA
REAL Y, Z
END MODULE
PROGRAM DEMO
USE SHARE_DATA ! All entities in SHARE_DATA are available
REAL B, Q ! through use association.
...
CALL CONS (Y)
CONTAINS
SUBROUTINE CONS (Y) ! Y is a local entity (dummy argument).
REAL C, Y
...
Y = B + C + Q + Z ! B and Q are available through host association.
... ! C is a local entity, explicitly declared.
END SUBROUTINE CONS ! is available through use association.
END PROGRAM DEMO