FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-22
COMMON Statement
block beyond its last storage location. The following examples illustrate this
restriction:
You cannot equivalence fields of two different common blocks in the same program
unit.
•
Common block size
The size of a common block is equal to the combined lengths of the entities it
contains, plus the additional storage space (if any) associated with it by
EQUIVALENCE statements.
•
Common storage and memory management
The LARGECOMMON, HIGHCOMMON, and EXTENDCOMMON directives affect
the addressing and storage of entities in common blocks. For additional
information, see Section 12, Memory Organization.
•
Observe the following constraints when using the COMMON statement:
°
You cannot use the same symbolic name in more than one common block
within a program unit.
°
You cannot include function names in common blocks.
°
You cannot include names of dummy arguments in common blocks.
°
If you include a RECORD name in a common block, it must be the only item in
that block, and the block must be named.
°
A RECORD cannot have more than one dimension.
°
If a common block contains type character data it must not contain data of any
other type.
•
If a program’s source code must be compatible with other FORTRAN compilers,
you must also observe the following restrictions:
°
Entities in a named common block can become undefined on execution of a
return from a subprogram. This is not the case with blank common.
°
A named common block must be the same size in all program units that
declare it. The blank common block can be different sizes in each program unit
that declares it.
Illegal Legal
COMMON xitem COMMON xitem
REAL price(5) REAL price(5)
EQUIVALENCE(xitem,price(5)) EQUIVALENCE(xitem,price(1))










