FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-20
COMMON Statement
unit specified in the UNIT specifier; this establishes a takeover point for the backup
process.
If you specify STACK = 'NO', FORTRAN does not checkpoint the memory stack
and does not establish a takeover point. If failure occurs, the backup uses the
takeover point established by a previous OPEN, CLOSE, or CHECKPOINT
statement that specified STACK = 'YES' or did not specify a STACK option.
Examples
CLOSE(25, ERR=500, STATUS='DELETE', STACK='NO')
CLOSE(IOSTAT=error, ERR=100, UNIT=10, STATUS='KEEP')
COMMON Statement
The COMMON statement enables multiple program units to share data.
cb
is the name of the block containing the entities in list. If you omit cb, FORTRAN
places the entities in blank common.
list
is a list of entities to be included in the common block. Separate list items with
commas. An entity can be a variable name, an array name with or without
dimensions, or a RECORD name with or without a dimension.
Considerations
•
Blank and named common
There are two types of common storage: unnamed or “blank” common and named
common. Before executing a program, FORTRAN allocates a block of storage for
blank common and a block of storage for each named common block.
If you omit the block name, all the entities in the associated list are stored in the
blank common block. If the first specification in the COMMON statement is for
blank common, you can also omit the slashes.
•
Character, numeric, and logical data in common blocks
You can place numeric and logical type entities in the same common block. A
common block containing character data cannot contain any other data type.
•
Multiple declarations of the same block
COMMON [ / [ cb ] / ] list [[,] / [ cb ] / list ]...










