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

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

INQUIRE: NEXTREC Specifier

The NEXTREC specifier asks where the next record can be read or written in a file connected for direct access. It takes the following form:

NEXTREC = nr

nr

Is a scalar integer variable that is assigned a value as follows:

  • If the file is connected for direct access and a record (r) was previously read or written, the value assigned is r + 1.

  • If no record has been read or written, the value assigned is 1.

  • If there are pending asynchronous data transfer operations for the specified file, the value assigned is computed as if all pending data transfers have already completed.

  • If the file is not connected for direct access, or if the file position cannot be determined because of an error condition, the value assigned is zero.

  • If the file is connected for direct access and a REWIND has been performed on the file, the value assigned is 1.