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

File Operation I/O Statements

The following are file connection, inquiry, and positioning I/O statements:

  • BACKSPACE

    Positions a sequential file at the beginning of the preceding record, making it available for subsequent I/O processing.

  • CLOSE

    Terminates the connection between a logical unit and a file or device.

  • DELETE

    Deletes a record from a relative file.

  • ENDFILE

    Writes an end-of-file record to a sequential file and positions the file after this record (the terminal point). For direct access files, truncates the file after the current record.

  • FLUSH

    Causes data written to a file to become available to other processes or causes data written to a file outside of Fortran to be accessible to a READ statement.

  • INQUIRE

    Requests information on the status of specified properties of a file or logical unit. For more information on specifiers you can use in INQUIRE statements, see INQUIRE Statement Specifiers.

  • OPEN

    Connects a Fortran logical unit to a file or device; declares attributes for read and write operations. For more information on specifiers you can use in OPEN statements, see OPEN Statement Specifiers.

  • REWIND

    Positions a sequential or direct access file at the beginning of the file (the initial point).

  • WAIT

    Performs a wait operation for a specified pending asynchronous data transfer operation.

The following table summarizes I/O statement specifiers:

I/O Specifiers

Specifier

Values

Description

Used with:

ACCESS=access

'SEQUENTIAL', 'DIRECT', 'STREAM', or 'APPEND'

Specifies the method of file access.

INQUIRE, OPEN

ACTION=permission

'READ', 'WRITE' or 'READWRITE' (default is 'READWRITE')

Specifies file I/O mode.

INQUIRE, OPEN

ADVANCE=c-expr

'NO' or 'YES' (default is 'YES')

Specifies formatted sequential data input as advancing, or non-advancing.

READ

ASSOCIATEVARIABLE=var

Integer variable

Specifies a variable to be updated to reflect the record number of the next sequential record in the file.

OPEN

ASYNCHRONOUS=asynch

'YES' or 'NO' (default is 'NO')

Specifies whether or not the I/O is done asynchronously

INQUIRE, OPEN