4.15 RECORD Statement

The RECORD statement creates a record having the form specified in a previously declared structure declaration. The effect of a RECORD statement is comparable to that of an ordinary type declaration, except composite or aggregate data items are declared instead of scalar data items.

A RECORD statement takes the following form:

RECORD /structure-name/record-namelist [, /structure-name/record-namelist] . . .
structure-name
Is the name of a previously declared structure.
record-namelist
Is a list of one or more record names (variable names, array names, or array declarators), separated by commas. All of the records named in this list have the same structure and are allocated separately in memory.

Rules and Behavior

You can use record names in COMMON and DIMENSION statements, but not in DATA, EQUIVALENCE, or NAMELIST statements.

Records initially have undefined values unless you have defined their values in structure declarations.

Examples

The following RECORD statement creates a pair of records (TODAY and YESTERDAY) in separate memory locations, but with the same structure (DATE):

RECORD /DATE/ TODAY,YESTERDAY

The following RECORD statement creates a record (CURRENT_CHECK) and an array of records (CHECKBOOK) with the structure CHECK:

RECORD /CHECK/ CURRENT_CHECK, CHECKBOOK(1000)

For More Information:


Previous Page Next Page Table of Contents