User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:make-two-way-stream [2019/07/14 17:00]
cl:functions:make-two-way-stream [2019/07/18 14:00] (current)
Line 1: Line 1:
 +====== Function MAKE-TWO-WAY-STREAM ======
 +
 +====Syntax====
 +  * **make-two-way-stream** //​input-stream output-stream//​ → //​two-way-stream//​
 +
 +====Arguments and Values====
 +  * //​input-stream//​ - a //​[[CL:​Glossary:​stream]]//​.
 +  * //​output-stream//​ - a //​[[CL:​Glossary:​stream]]//​.
 +  * //​two-way-stream//​ - a //​[[CL:​Glossary:​two-way stream]]//.
 +
 +====Description====
 +Returns a //​[[CL:​Glossary:​two-way stream]]// that gets its input from //​input-stream//​ and sends its output to //​output-stream//​.
 +
 +====Examples====
 +<​blockquote>​
 +([[CL:​Macros:​defvar]] *what-is-read*) <​r>​*WHAT-IS-READ*</​r>​
 +([[CL:​Macros:​with-output-to-string]] (out) 
 +  ([[CL:​Macros:​with-input-from-string]] (in "​input"​) ​
 +    ([[CL:​Special Operators:​let]] ((two (make-two-way-stream in out))) ​
 +      ([[CL:​Functions:​format]] two "​output"​) ​
 +      ([[CL:​Macros:​setf]] *what-is-read* ([[CL:​Functions:​read]] two))))) <​r>"​output"​ </r>
 +*what-is-read* <​r>​INPUT </r>
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +Should signal an error of type type-error if //​input-stream//​ is not an //​[[CL:​Glossary:​input]]//​ //​[[CL:​Glossary:​stream]]//​. Should signal an error of type type-error if //​output-stream//​ is not an //​[[CL:​Glossary:​output]]//​ //​[[CL:​Glossary:​stream]]//​.
 +
 +====See Also====
 +None.
 +
 +====Notes====
 +None.
 +
 +\issue{STREAM-ACCESS:​ADD-TYPES-ACCESSORS}