Intel® Fortran Compiler 18.0 Developer Guide and Reference

OPEN: POSITION Specifier

The POSITION specifier indicates the position of a file connected for sequential access. It takes the following form:

POSITION = pos

pos

Is a scalar default character expression that evaluates to one of the following values:

'ASIS'

Indicates the file position is unchanged if the file exists and is already connected. The position is unspecified if the file exists but is not connected.

'REWIND'

Indicates the file is positioned at its initial point.

'APPEND'

Indicates the file is positioned at its terminal point (or before its end-of-file record, if any).

The default is 'ASIS'.

A new file (whether specified as new explicitly or by default) is always positioned at its initial point.

In addition to the POSITION specifier, you can use position statements. The BACKSPACE statement positions a file back one record. The REWIND statement positions a file at its initial point. The ENDFILE statement writes an end-of-file record at the current position and positions the file after it. Note that ENDFILE does not go the end of an existing file, but creates an end-of-file where it is.