Intel® Fortran Compiler 16.0 User and Reference Guide
The following are file connection, inquiry, and positioning I/O statements:
Positions a sequential file at the beginning of the preceding record, making it available for subsequent I/O processing.
Terminates the connection between a logical unit and a file or device.
Deletes a record from a relative file.
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.
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.
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.
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.
Positions a sequential or direct access file at the beginning of the file (the initial point).
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. |
|
ACTION=permission |
'READ', 'WRITE' or 'READWRITE' (default is 'READWRITE') |
Specifies file I/O mode. |
|
ADVANCE=c-expr |
'NO' or 'YES' (default is 'YES') |
Specifies formatted sequential data input as advancing, or non-advancing. |
|
ASSOCIATEVARIABLE=var |
Integer variable |
Specifies a variable to be updated to reflect the record number of the next sequential record in the file. |
|
ASYNCHRONOUS=asynch |
'YES' or 'NO' (default is 'NO') |
Specifies whether or not the I/O is done asynchronously |
|
BINARY=bin |
'NO' or 'YES' |
Returns whether file format is binary. |
|
BLANK=blank_control |
'NULL' or 'ZERO' (default is 'NULL') |
Specifies whether blanks are ignored in numeric fields or interpreted as zeros. |
|
BLOCKSIZE=blocksize |
Positive integer variable or expression |
Specifies or returns the internal buffer size used in I/O. |
|
BUFFERCOUNT=bc |
Numeric expression |
Specifies the number of buffers to be associated with the unit for multibuffered I/O. |
|
BUFFERED=bf |
'YES' or 'NO' (default is 'NO') |
Specifies run-time library behavior following WRITE operations. |
|
CARRIAGECONTROL= control |
'FORTRAN', 'LIST', or 'NONE' |
Specifies carriage control processing. |
|
CONVERT=form |
'LITTLE_ENDIAN', 'BIG_ENDIAN', 'CRAY', 'FDX', 'FGX', 'IBM', 'VAXD', 'VAXG', or 'NATIVE' (default is 'NATIVE') |
Specifies a numeric format for unformatted data. |
|
DEFAULTFILE=var |
Character expression |
Specifies a default file pathname string. |
|
DELIM=delimiter |
'APOSTROPHE', 'QUOTE' or 'NONE' (default is 'NONE') |
Specifies the delimiting character for list-directed or namelist data. |
|
DIRECT=dir |
'NO' or 'YES' |
Returns whether file is connected for direct access. |
|
DISPOSE=dis (or DISP=dis) |
'KEEP', 'SAVE', 'DELETE', 'PRINT', 'PRINT/DELETE', 'SUBMIT', or 'SUBMIT/DELETE' (default is 'DELETE' for scratch files; 'KEEP' for all other files) |
Specifies the status of a file after the unit is closed. |
|
formatlist |
Character variable or expression |
Lists edit descriptors. Used in FORMAT statements and format specifiers (the FMT=formatspec option) to describe the format of data. |
|
END=endlabel |
Integer between 1 and 99999 |
When an end of file is encountered, transfers control to the statement whose label is specified. |
|
EOR=eorlabel |
Integer between 1 and 99999 |
When an end of record is encountered, transfers to the statement whose label is specified. |
|
ERR=errlabel |
Integer between 1 and 99999 |
Specifies the label of an executable statement where execution is transferred after an I/O error. |
All except PRINT |
EXIST=ex |
.TRUE. or .FALSE. |
Returns whether a file exists and can be opened. |
|
FILE=file (or NAME=name) |
Character variable or expression. Length and format of the name are determined by the operating system |
Specifies the name of a file |
|
[FMT=]formatspec |
Character variable or expression |
Specifies an editlist to use to format data. |
|
FORM=form |
'FORMATTED', 'UNFORMATTED', or 'BINARY' |
Specifies a file's format. |
|
FORMATTED=fmt |
'NO' or 'YES' |
Returns whether a file is connected for formatted data transfer. |
|
IOFOCUS=iof |
.TRUE. or .FALSE. (default is .TRUE. unless unit '*' is specified) |
Specifies whether a unit is the active window in a QuickWin application. |
|
iolist |
List of variables of any type, character expression, or NAMELIST |
Specifies items to be input or output. |
|
IOSTAT=iostat |
Integer variable |
Specifies a variable whose value indicates whether an I/O error has occurred. |
All except PRINT |
MAXREC=var |
Numeric expression |
Specifies the maximum number of records that can be transferred to or from a direct access file. |
|
MODE=permission |
'READ', 'WRITE' or 'READWRITE' (default is 'READWRITE') |
Same as ACTION. |
INQUIRE, OPEN |
NAMED=var |
.TRUE. or .FALSE. |
Returns whether a file is named. |
|
NEWUNIT=u-var |
Scalar integer variable |
Is assigned an unused unit number that is automatically chosen. It is always a negative integer. |
|
NEXTREC=nr |
Integer variable |
Returns where the next record can be read or written in a file. |
|
[NML=]nmlspec |
Namelist name |
Specifies a namelist group to be input or output. |
|
NUMBER=num |
Integer variable |
Returns the number of the unit connected to a file. |
|
OPENED=od |
.TRUE. or .FALSE. |
Returns whether a file is connected. |
|
ORGANIZATION=org |
'SEQUENTIAL' or 'RELATIVE' (default is 'SEQUENTIAL') |
Specifies the internal organization of a file. |
|
PAD=pad_switch |
'YES' or 'NO' (default is 'YES') |
Specifies whether an input record is padded with blanks when the input list or format requires more data than the record holds, or whether the input record is required to contain the data indicated. |
|
POS=pos |
Positive integer |
Specifies the file storage unit position in a stream file. |
|
POSITION=file_pos |
'ASIS', 'REWIND' or 'APPEND' (default is 'ASIS') |
Specifies position in a file. |
|
READ=rd |
'NO' or 'YES' |
Returns whether a file can be read. |
|
READONLY |
Specifies that only READ statements can refer to this connection. |
||
READWRITE=rdwr |
'NO' or 'YES' |
Returns whether a file can be both read and written to. |
|
REC=rec |
Positive integer variable or expression |
Specifies the first (or only) record of a file to be read from, or written to. |
|
RECL=length (or RECORDSIZE=length) |
Positive integer variable or expression |
Specifies the record length in direct access files, or the maximum record length in sequential files. |
|
RECORDTYPE=typ |
'FIXED', 'VARIABLE', 'SEGMENTED', 'STREAM', 'STREAM_LF', or 'STREAM_CR' |
Specifies the type of records in a file. |
|
SEQUENTIAL=seq |
'NO' or 'YES' |
Returns whether file is connected for sequential access. |
|
SHARE=share |
'COMPAT', 'DENYNONE', 'DENYWR', 'DENYRD', or 'DENYRW' (default is 'DENYNONE') |
Controls how other processes can simultaneously access a file on networked systems. |
|
SHARED |
Specifies that a file is connected for shared access by more than one program executing simultaneously. |
||
SIZE=size |
Integer variable |
Returns the number of characters read in a nonadvancing READ before an end-of-record condition occurred. |
|
STATUS=status (or TYPE=status) |
'OLD', 'NEW', 'UNKNOWN' or 'SCRATCH' (default is 'UNKNOWN') |
Specifies the status of a file on opening and/or closing. |
|
TITLE=name |
Character expression |
Specifies the name of a child window in a QuickWin application. |
|
UNFORMATTED=unf |
'NO' or 'YES' |
Returns whether a file is connected for unformatted data transfer. |
|
[UNIT=]unitspec |
Integer variable or expression |
Specifies the unit to which a file is connected. |
All except PRINT |
USEROPEN=fname |
Name of a user-written function |
Specifies an external function that controls the opening of a file. |
|
WRITE=rd |
'NO' or 'YES' |
Returns whether a file can be written to. |