Used to flush any data contained in the Stream buffer of an output stream. Flushing means that the data is transferred from a memory buffer to the operation system's I/O system.
Buffers are normally only flushed when they get full, or when the stream is closed. Explicit flushing in between reduces performance, but sometimes it is desirable to make sure that data is actually written at certain points.
Note that streams can be also be configured to flush automatically at every newline, using the flush(end_of_line) option.
Stream can be a symbolic stream name (atom) or a stream handle.
Success: flush(output). flush(null). Error: flush(Stream). (Error 4). flush("Stream"). (Error 5). flush(12). (Error 192). % no such stream flush(debug_input). (Error 192). % input stream