Function finish-output, force-output, clear-output

Syntax:

finish-output &optional output-stream nil

force-output &optional output-stream nil

clear-output &optional output-stream nil

Arguments and Values:

output-stream—an output stream designator. The default is standard output.

Description:

finish-output, force-output, and clear-output exercise control over the internal handling of buffered stream output.

finish-output attempts to ensure that any buffered output sent to output-stream has reached its destination, and then returns.

force-output initiates the emptying of any internal buffers but does not wait for completion or acknowledgment to return.

22.3.1 19clear-output attempts to abort any outstanding output operation in progress in order to allow as little output as possible to continue to the destination.

This next sentence was added per Moon, since it was present in CLtL for CLEAR-INPUT and probably only accidentally omitted here. (I agree.) -kmp 11-Feb-92If any of these operations does not make sense for output-stream, then it does nothing. 22.3.1 20The precise actions of these functions are implementation-dependent.

Examples:

;; Implementation A
 (progn (princ "am i seen?") (clear-output))
→ NIL

;; Implementation B
 (progn (princ "am i seen?") (clear-output))
⊳ am i seen?
→ NIL

Side Effects:

None.

Affected By:

*standard-output*

Exceptional Situations:

Should signal an error of type type-error if output-stream is not a stream designator.

!!! Barmar: Are conditions signaled if stream is closed?

See Also:

clear-input

Notes:

None.