02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INQUIRE<br />

Returns information about file properties.<br />

Syntax<br />

The syntax of the INQUIRE statement has two forms:<br />

Inquiry by output list:<br />

INQUIRE ( IOLENGTH= integer-variable) output-list<br />

Inquiry by unit or file:<br />

INQUIRE (io-specifier-list)<br />

integer-variable<br />

output-list<br />

io-specifier-list<br />

[UNIT=]unit<br />

ACCESS=character<br />

<strong>HP</strong> <strong>Fortran</strong> statements<br />

INQUIRE<br />

is the length of the unformatted record that would result from writing<br />

output-list to a direct-access file. The value returned in<br />

integer-variable canbeusedwiththeRECL= specifier in an OPEN<br />

statement to specify the length of each record in an unformatted<br />

direct-access file that will hold the data in output-list.<br />

is a comma-separated list of data items, similar to what would be included<br />

with the WRITE or PRINT statement. The data items can include variables<br />

and implied-DO lists (see “Implied-DO loop” on page 191).<br />

is a list of comma-separated I/O specifiers. As noted in the following<br />

descriptions, most of the specifiers return information about the specified<br />

unit or file. io-specifier-list must include either the UNIT= or FILE=<br />

specifier, but not both. The following paragraphs describe all the I/O<br />

specifiers that can appear in io-specifier-list:<br />

specifies the unit connected to an external file. unit must be an integer<br />

expression that evaluates to a number greater than 0. If the optional<br />

keyword UNIT= is omitted, unit must be the first item in<br />

io-specifier-list. Ifunit appears in io-specifier-list, theFILE=<br />

specifier must not be used.<br />

Chapter 10 341

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!