Types of I/O Statements

The table below lists the Intel Fortran I/O statements:

Category and statement name

Description

File connection

OPEN

Connects a unit number with an external file and specifies file connection characteristics.  

CLOSE

Disconnects a unit number from an external file.  

File inquiry

DEFINE FILE

Specifies file characteristics for a direct access relative file and connects the unit number to the file, similar to an OPEN statement. Provided for compatibility with compilers older than FORTRAN-77.  

INQUIRE

Returns information about a named file, a connection to a unit, or the length of an output item list.  

Record position

BACKSPACE

Moves the record position to the beginning of the previous record (sequential access only).  

DELETE

Marks a record at the current record position in a relative file as deleted (direct access only).  

ENDFILE

Writes an end-of-file marker after the current record (sequential access only).  

FIND

Changes the record position in a direct access file. Provided for compatibility with compilers older than FORTRAN-77.  

REWIND

Sets the record position to the beginning of the file (sequential access only).  

Record input  

READ

Transfers data from an external file record or an internal file to internal storage.  

UNLOCK

For performance reasons, this statement is not supported by Intel® Fortran.

ACCEPT

Reads input from stdin. Unlike READ, ACCEPT only provides formatted sequential input  and does not specify a unit number.

Record output

WRITE

Transfers data from internal storage to an external file record or to an internal file.  

REWRITE

Transfers data from internal storage to an external file record at the current record position (direct access relative files only).  

TYPE

Writes record output to stdout (same as PRINT).  

PRINT

Transfers data from internal storage to stdout. Unlike WRITE, PRINT only provides formatted sequential output and does not specify a unit number.  

In addition to the READ, WRITE, REWRITE, TYPE, and PRINT statements, other I/O record-related statements are limited to a specific file organization. For instance:

The file-related statements (OPEN, INQUIRE, and CLOSE) apply to any relative or sequential file.