FLUSH(3F) Last changed: 1-6-98
NAMEFLUSH - 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
DESCRIPTIONFLUSH 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.
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. 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 INTRO_IO(3F) for more information.
SEE ALSOexplain(1) in the UNICOS User Commands Reference Manual, publication
SR-2011 to see a description of the error code.
Application Programmer's Library Reference Manual, publication SR-
2165, for the printed version of this man page.