fflush

Purpose

Flushes a file’s output buffer.

Format

ret = fflush(fh)
Parameters:

fh (scalar) – file handle of a file opened with fopen().

Returns:

ret (scalar) – 0 if successful, -1 if not.

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.