flush_output/1

Synopsis

flush_output(+Stream)

Forces the buffered output of the stream Stream to be sent to the associated device.

Arguments


Stream stream_object
a valid Prolog stream

Description

Sends the current buffered output of an output stream Stream to the actual output device, which is usually a disk or a tty device. flush_output/1 fails if Stream does not permit flushing or the bottom layer flushing function of Stream is not properly defined.

Exceptions

Stream errors (see ref-iou-sfh-est), plus:


permission_error
An error occurred in flushing out the buffered output.

Comments

If the host operating system, such as UNIX, buffers an output file stream, the output may be written to the disk some time after flush_output/1 succeeds.

See Also

nl/[0,1], QP_flush(), QU_flush_output(), ttyflush/0