flush(3Tcl) flush(3Tcl)
flush - Flush buffered output for a file
flush fileId
Flushes any output that has been buffered for fileId. FileId must have
been the return value from a previous call to open, or it may be stdout
or stderr to access one of the standard I/O streams; it must refer to a
file that was opened for writing. The command returns an empty string.
buffer, file, flush, output
Page 1
FLUSH(3F) FLUSH(3F)
flush - flush output to a logical unit
subroutine flush (lunit)
Flush causes the contents of the buffer for logical unit lunit to be
flushed to the associated file. There is usually an 8K buffer associated
with block device output whereas terminal output is line-buffered.
/usr/lib/libU77.a
Page 1
FLUSH(3F) Last changed: 1-6-98
FLUSH - Writes data buffered by Fortran output statements to a file
UNICOS and UNICOS/mk systems:
CALL FLUSH(iunit)
CALL FLUSH(iunit,[istat]
IRIX systems:
CALL FLUSH(iunit, istat)
UNICOS, UNICOS/mk, and IRIX systems
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.
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.
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.
explain(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 SR2165,
for the printed version of this man page.
FLUSH(3F) Last changed: 1-6-98
FLUSH - Writes data buffered by Fortran output statements to a file
UNICOS and UNICOS/mk systems:
CALL FLUSH(iunit)
CALL FLUSH(iunit,[istat]
IRIX systems:
CALL FLUSH(iunit, istat)
UNICOS, UNICOS/mk, and IRIX systems
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.
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.
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.
explain(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 SR2165,
for the printed version of this man page.
[ Back ]
|