Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public
Document Table of Contents

RECORD

Statement: Declares a record structure as an entity with a name.

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 variable names, array names, or array specifications, separated by commas. All of the records named in this list have the same structure and are allocated separately in memory.

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

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

STRUCTURE and RECORD constructs have been replaced by derived types, which should be used in writing new code. See Derived Data Types.

Example

 STRUCTURE /address/
   LOGICAL*2    house_or_apt
   INTEGER*2    apt
   INTEGER*2    housenumber
   CHARACTER*30 street
   CHARACTER*20 city
   CHARACTER*2  state
   INTEGER*4    zip
 END STRUCTURE

 RECORD /address/ mailing_addr(20), shipping_addr(20)

The following shows another example:

RECORD /T1/ a, b, /T2/ c, /T3/ d, e, f