HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
COMMON
Chapter 10302
COMMON a,b,c /x/y,x,d //w,r
COMMON /cap/hat,visor, //tax, /x/o,t
are equivalent to:
COMMON a,b,c,w,r,tax
COMMON /x/y,x,d,o,t
COMMON /cap/hat,visor
Unlike named common blocks, blank common can differ in size in different scoping units.
However, blank common cannot be initialized.
As an extension, HP Fortran saves all common blocks in static memory.
The following restrictions apply to the use of common blocks:
All common block names must be distinct from subprogram names.
The size of a named common block must be the same in all program units where it is
declared. Note, however, that the size of blank common can differ.
The following data items must not appear in a COMMON statement:
Dummy arguments in a subprogram
Functions, subroutines, or intrinsic functions
Pointees declared by Cray-style pointers
Variables accessible by use association
Automatic entities, including automatic character strings
Allocatable arrays
Derived-type objects may appear in common if they have been defined with the SEQUENCE
attribute.
A variable can only appear in one COMMON statement within a program unit.
Zero-sized common blocks are allowed. Zero-sized common blocks with the same name are
storage associated.
Array bounds in a COMMON statement must be constant specification expressions.
A pointer may appear in common if it has the same type, type parameter, and rank in
every instance of that common block.
Initializing common blocks
As an extension to the Standard, HP Fortran allows common blocks to be initialized outside of
a block data program unit; for example, in a subroutine. However, note that all data
initialization for a given common block must occur in the same compilation unit.