FORTRAN Reference Manual

Introduction to File I/O in the HP NonStop
Environment
FORTRAN Reference Manual528615-001
5-25
Control Specifiers in I/O Statements
Table 5-7. I/0 Control Specifiers (page 1 of 2)
Control
Specifier Meaning
UNIT = unit Is an integer expression ranging from 1 through 999 that specifies the
FORTRAN unit to use. unit can be an asterisk (*) implying the default
input unit in a READ statement or the default output unit in a WRITE
statement.
unit can also be the name of a character variable, array, array element,
or substring identifying an internal file.
If you omit the UNIT= part of this specifier, unit must be the first item in
the control specifier list.
FMT = fmt Specifies a format to be used for formatted I/O; fmt can be:
A statement label of a FORMAT statement in the same program unit.
A character expression whose value is the format specification.
A character array name whose elements, concatenated together,
contain the format specification.
An integer variable that has been assigned the statement number of
a FORMAT statement by an ASSIGN statement.
An asterisk (*) indicating list-directed I/O.
If fmt is a character array name or a character expression, its value must
be a format specification (as described in FORMAT Statement
on
page 7-39) except that it does not begin with the word FORMAT. It must,
however, include the parentheses that enclose the list of format items, as
in the following example:
FMT = '(I5, A8)'
If you omit the FMT= part of this specification, fmt must be the second
item in the control list, and the unit specifier, without the characters
UNIT=, must be the first item in the list.
REC = rn Specifies the number of the record to be read or written to a file that is
opened for direct access. This is applicable to unstructured, relative, and
EDIT format files.