FORTRAN Reference Manual

Statements
FORTRAN Reference Manual528615-001
7-67
INQUIRE Statement
'YES'. If the file can never be connected for unformatted I/O, unf returns the
value 'NO'. If the system cannot determine whether unformatted I/O is
permitted, unf returns the value 'UNKNOWN'.
HP FORTRAN always returns 'YES' in fmt.
RECL = rcl
rcl is an integer variable or array element that returns the record length,
specified in bytes, for the file. rcl returns a value of zero if the file is not open.
NEXTREC = nr
nr is an INTEGER*4 variable or array element. For an open unstructured or
relative disk file, the system obtains the record number of the last record read
or written, adds 1, and stores the result in nr. If no records have been
transferred since the file was connected, nr returns the value 1.
For an open EDIT format file, nr returns the EDIT line number, multiplied by
1000, of the most recently read or written record. If the last line had the number
12.34, nr returns the value 12340. If the file is rewound, nr returns -1.
If the most recent record read or written is an end of file, nr returns -2. For an
open file that is not capable of direct access, nr returns -1. For a file that does
not exist or is not connected, nr returns 0.
BLANK = blank
blank is a character variable or array element. If the file is connected for
formatted I/O, and was opened with zero blank control or numeric input fields
(null is assumed if the OPEN statement contained no blank specifier or there
was no OPEN statement for the file), blank returns the value 'ZERO'.
Otherwise, blank returns 'NULL'.
Considerations
There are two forms of the INQUIRE statement: inquiry by file and inquiry by unit,
depending on whether you specify file-name or unit in the statement. A single
INQUIRE statement can execute only one type of inquiry.
The INQUIRE statement must specify either a file name or a unit, but not both, and
not more than one each of the other control specifiers listed in the syntax diagram.
The control specifiers can appear in any order, except that if you omit the UNIT=
keyword, the unit specifier must be the first item in the list.
In the INQUIRE statement, FORTRAN returns all string values in upper case
letters.
NAME= fname
The file name assigned to fname when you execute an INQUIRE statement is the
fully qualified name of the file and is, therefore, not necessarily the same as the