HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
INQUIRE
Chapter 10 375
INQUIRE
Returns information about file properties.
Syntax
The syntax of the INQUIRE statement has two forms:
Inquiry by output list:
INQUIRE ( IOLENGTH=
integer-variable
)
output-list
Inquiry by unit or file:
INQUIRE (
io-specifier-list
)
integer-variable
is the length of the unformatted record that would result from writing
output-list
to a direct-access file. The value returned in
integer-variable
can be used with the RECL= specifier in an OPEN
statement to specify the length of each record in an unformatted
direct-access file that will hold the data in
output-list
.
output-list
is a comma-separated list of data items, similar to what would be included
with the WRITE or PRINT statement. The data items can include variables
and implied-DO lists (see “Implied-DO loop” on page 223).
io-specifier-list
is a list of comma-separated I/O specifiers. As noted in the following
descriptions, most of the specifiers return information about the specified
unit or file.
io-specifier-list
must include either the UNIT= or FILE=
specifier, but not both. The following paragraphs describe all the I/O
specifiers that can appear in
io-specifier-list
:
[UNIT=]
unit
specifies the unit connected to an external file.
unit
must be an integer
expression that evaluates to a number greater than 0. If the optional
keyword UNIT= is omitted,
unit
must be the first item in
io-specifier-list
. If
unit
appears in
io-specifier-list
, the FILE=
specifier must not be used.
ACCESS=
character