User Tools


Function MAKE-TWO-WAY-STREAM

Syntax

  • make-two-way-stream input-stream output-streamtwo-way-stream

Arguments and Values

Description

Returns a two-way stream that gets its input from input-stream and sends its output to output-stream.

Examples

(defvar *what-is-read*)

*WHAT-IS-READ*

(with-output-to-string (out) (with-input-from-string (in "input") (let ((two (make-two-way-stream in out))) (format two "output") (setf *what-is-read* (read two)))))

"output"

*what-is-read*

INPUT

Side Effects

None.

Affected By

None.

Exceptional Situations

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

See Also

None.

Notes

None.

\issue{STREAM-ACCESS:ADD-TYPES-ACCESSORS}