Intel® Fortran Compiler 16.0 User and Reference Guide

FLUSH Statement

Statement: 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. It takes one of the following forms:

Syntax

FLUSH([UNIT=]io-unit [, ERR=label] [, IOMSG=msg-var] [IOSTAT=i-var])

FLUSH io-unit

io-unit

(Input) Is an external unit specifier.

label

(Input) Is the label of the branch target statement that receives control if an error occurs.

msg-var

(Output) Is a scalar default character variable that is assigned an explanatory message if an I/O error occurs.

i-var

(Output) Is a scalar integer variable that is defined as a positive integer if an error occurs and zero if no error occurs.

The FLUSH statement specifiers can appear in any order. An I/O unit must be specified, but the UNIT= keyword is optional if the unit specifier is the first item in the I/O control list.

This statement has no effect on file position.