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

ID 767251
Date 9/08/2022
Public

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

Document Table of Contents

Record I/O Statement Specifiers

After you open a file or use a preconnected file, you can use the following statements:

  • READ, WRITE, ACCEPT, and PRINT to perform record I/O.

  • BACKSPACE, ENDFILE, and REWIND to set record position within the file.

  • DELETE, REWRITE, TYPE, and FIND to perform various operations.

The record I/O statement must use the appropriate record I/O form (formatted, list-directed, namelist, or unformatted).

You can use the following specifiers with the READ and WRITE record I/O statements:

  • UNIT specifies the unit number to or from which input or output will occur.

  • END specifies a label to branch to if end-of-file occurs; only applies to input statements on sequential files.

  • ERR specifies a label to branch to if an error occurs.

  • IOSTAT specifies an integer variable to contain the error number if an error occurs.

  • FMT specifies a label of a FORMAT statement or character data specifying a FORMAT.

  • NML specifies the name of a NAMELIST.

  • REC specifies a record number for direct access.

When using nonadvancing I/O, use the ADVANCE, EOR, and SIZE specifiers.

When using the REWRITE statement, you can use the UNIT, FMT, ERR, and IOSTAT specifiers.