HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
USE
Chapter 10488
USE
Provides controlled access to module entities.
Syntax
A USE statement has one of the following forms:
USE
module-name
[,
rename-list
]
USE
module-name
, ONLY :
access-list
rename-list
is a comma-separated list of
rename
rename
is
local-name
=>
module-entity-name
access-list
is a comma-separated list of the following:
[
local-name
=>]
module-entity-name
OPERATOR (
operator
)
ASSIGNMENT (=)
Description
The USE statement provides access to a module’s public specifications and definitions. These
include declared variables, named constants, derived-type definitions, procedure interfaces,
procedures, generic identifiers, and namelist groups. The method of access is called use
association. Such access may be limited by an ONLY clause on the USE statement, or the
accessed entities may be renamed.
All USE statements must appear after the program unit header statement and before any
other statements. More than one USE statement may be present, including more than one
referring to the same module.
Modules may contain USE statements referring to other modules; however, references must
not directly or indirectly be recursive.
The local-name in a renaming operation is not declared: it assumes the attributes of the
module entity being renamed.
The first two forms of the USE statement make available by use association all publicly
accessible entities in the module, except that the USE statement may rename some module
entities. The third form makes available only those entities specified in
access-list
, with
possible renaming of some module entities.