User Tools


Differences

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

Link to this comparison view

cl:functions:input-stream-p [2019/07/14 17:00]
cl:functions:input-stream-p [2019/10/19 05:00] (current)
Line 1: Line 1:
 +====== Function INPUT-STREAM-P,​ OUTPUT-STREAM-P ======
 +
 +====Syntax====
 +  * **input-stream-p** //stream// → //​generalized-boolean// ​
 +  * **output-stream-p** //stream// → //​generalized-boolean//​
 +
 +====Arguments and Values====
 +  * //stream// - a //​[[CL:​Glossary:​stream]]//​.
 +  * //​generalized-boolean//​ - a //​[[CL:​Glossary:​generalized boolean]]//​.
 +
 +====Description====
 +**input-stream-p** returns //​[[CL:​Glossary:​true]]//​ if //stream// is an //​[[CL:​Glossary:​input]]//​ //​[[CL:​Glossary:​stream]]//;​ otherwise, returns //​[[CL:​Glossary:​false]]//​.
 +
 +**output-stream-p** returns //​[[CL:​Glossary:​true]]//​ if //stream// is an //​[[CL:​Glossary:​output]]//​ //​[[CL:​Glossary:​stream]]//;​ otherwise, returns //​[[CL:​Glossary:​false]]//​. ​
 +====Examples====
 +<​blockquote>​
 +(input-stream-p [[CL:​Variables:​star-standard-input-star|*standard-input*]]) → //​[[CL:​Glossary:​true]]// ​
 +(input-stream-p [[CL:​Variables:​star-terminal-io-star|*terminal-io*]]) → //​[[CL:​Glossary:​true]]// ​
 +(input-stream-p ([[CL:​Functions:​make-string-output-stream]])) → //​[[CL:​Glossary:​false]]//​
 +
 +(output-stream-p [[CL:​Constant Variables:​star-standard-output-star|*standard-output*]]) → //​[[CL:​Glossary:​true]]// ​
 +(output-stream-p [[CL:​Constant Variables:​star-terminal-io-star|*terminal-io*]]) → //​[[CL:​Glossary:​true]]// ​
 +(output-stream-p ([[CL:​Functions:​make-string-input-stream]] "​jr"​)) → //​[[CL:​Glossary:​false]]// ​
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +Should signal an error of type type-error if //stream// is not a //​[[CL:​Glossary:​stream]]//​.
 +
 +====See Also====
 +None.
 +
 +====Notes====
 +None.
 +