fflush#
Purpose#
Flushes a file’s output buffer.
Format#
Remarks#
If fflush() fails, you can call fstrerror() to find out why.
If you pass fflush() the handle of a file opened with open (i.e., a data
set or matrix file), your program will terminate with a fatal error.
Example#
// Write to a file and flush the buffer
fname = tempname("/tmp", "ex", ".txt");
fh = fopen(fname, "w");
call fputs(fh, "buffered data");
ret = fflush(fh);
print "Flush result (0=success):" ret;
call close(fh);