fflush
flush output for a buffered file
Calling Sequence
Parameters
Description
Examples
fflush(file ...)
file
-
one or more names or file descriptors of open files to be flushed
Ensures that any output which has been written to the specified file, which is assumed to have been opened either implicitly or by fopen or popen, is actually written to disk.
fflush does not return anything.
When a file is closed, it is automatically flushed.
This example will only work on Unix machines. For other platforms, replace cat in the ssystem calling sequences with the corresponding system command.
fd≔fopen⁡testFile,WRITE,TEXT
fd≔0
fprintf⁡fd,`This is a test `
15
ssystem⁡cat testFile
0,
fflush⁡fd
0,This is a test
fclose⁡fd
See Also
fclose
file_types
fopen
IO_errors
open
Download Help Document