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

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:

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.