flush(7f) - [FORTRAN:IO] flush I/O buffers of specified files
Synopsis
Description
Options
Returns
Example
flush file-unit-numberflush([UNIT=]file_unit_number,[iostat=i],[iomsg=string],[err=label_number])or
Because the Fortran standard does not specify the mechanism of file storage, the exact meaning of the flush operation is not precisely defined. The intention is that the flush operation should make all data written to an external file available to other processes or devices, or causes data placed in an external file by means other than the current Fortran process to be available to a subsequent READ statement. This is commonly called "flushing I/O buffers". These actions are processor dependent.
Execution of a FLUSH statement performs a wait operation for all pending asynchronous data transfer operations for the specified unit.
Execution of a FLUSH statement for a file that is connected but does not exist is permitted and has no effect on any file. A FLUSH statement has no effect on file position.
No specifier shall appear more than once in a given flush-spec-list.
[UNIT=]file-unit-number Required. If the optional characters UNIT= are omitted from the unit specifier, the file-unit-number must be the first item. ERR=label The label must branch to a target statement in the same scoping unit as the FLUSH statement.
IOSTAT=scalar-int-variable variable is set to a processor-dependent positive value if an error occurs, to zero if the flush operation was successful, or to a processor-dependent negative value if the flush operation is not supported for the unit specified. IOMSG=iomsg-variable message describing any error that occurred
flush (10, iostat = n)
flush (7) | March 18, 2019 |