flush(3F)
FLUSH - Writes data buffered by Fortran output statements to a file
As shipped in IRIX 6.5.15. Last changed in IRIX 6.5.5.
NAME FLUSH - Writes data buffered by Fortran output statements to a file SYNOPSIS UNICOS and UNICOS/mk systems: CALL FLUSH(iunit) CALL FLUSH(iunit,[istat]) IRIX systems: CALL FLUSH(iunit, istat) IMPLEMENTATION UNICOS, UNICOS/mk, and IRIX systems DESCRIPTION FLUSH writes to a file any buffered data previously written by Fortran output statements. FLUSH may be called after reading or writing. The current file position is not changed. When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on UNICOS, UNICOS/mk, or IRIX, all arguments must be of default kind unless documented otherwise. On UNICOS and UNICOS/mk, default kind is KIND=8 for integer, real, complex, and logical arguments; on IRIX, the default kind is KIND=4. This routine has the following arguments: iunit Integer variable, expression, or constant containing a Fortran unit number. If this value is 101, it flushes the unit which is connected to standard output. If this value is 102, it flushes the unit which is connected to standard error. istat Integer variable or array element that receives the return status as follows: =0 Indicates that all buffered data, if any, was flushed. A file that was immediately read, or a file with a buffer that has not changed since the last flush, might return a 0 status even though no new data would be written to the file. -1 Indicates that the Fortran unit does not support FLUSH, and no data was written to the file. >0 Indicates that an error condition was encountered. The specific error number is returned. Use the explain(1) command for a description of the error code. The istat argument is optional on UNICOS systems; the user program is aborted if FLUSH is called without istat and an error condition is encountered. NOTES If FLUSH is called with an unconnected unit, an error condition results (except for units 101 and 102). Calling FLUSH for a file for which the program does not have write permission returns a 0 status if no data was written to that file previously with Fortran I/O statements. A WRITE I/O statement with an asterisk unit identifier (or a PRINT statement) uses unit 101. See "Fortran I/O Units" in INTRO_IO(3F) on UNICOS and UNICOS/mk systems for more information (INTRO_IO is not available on IRIX systems). SEE ALSO explain(1) in the UNICOS User Commands Reference Manual to see a description of the error code. Application Programmer's Library Reference Manual for the printed version of this man page.