Sun Studio 12: Fortran Library Reference

1.4.11 flush: Flush Output to a Logical Unit

The function is called by:

INTEGER*4 flush

n = flush( lunit )

lunit

INTEGER*4

Input 

Logical unit 

Return value 

INTEGER*4

Output 

n = 0 no errorn > 0 error number

The flush function flushes the contents of the buffer for the logical unit, lunit, to the associated file. This is most useful for logical units 0 and 6 when they are both associated with the console terminal. The function returns a positive error number if an error was encountered; zero otherwise.

See also fclose(3S).