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

cl:functions:interactive-stream-p [2019/06/15 02:00] |
cl:functions:interactive-stream-p [2020/07/02 09:00] (current) |
||
---|---|---|---|

Line 1: | Line 1: | ||

+ | ====== Function INTERACTIVE-STREAM-P ====== | ||

+ | |||

+ | ====Syntax==== | ||

+ | * **interactive-stream-p** //stream// → //generalized-boolean// | ||

+ | |||

+ | ====Arguments and Values==== | ||

+ | * //stream// - a //[[CL:Glossary:stream]]//. | ||

+ | * //generalized-boolean// - a //[[CL:Glossary:generalized boolean]]//. | ||

+ | |||

+ | ====Description==== | ||

+ | Returns //[[CL:Glossary:true]]// if //stream// is an //[[CL:Glossary:interactive stream]]//; otherwise, returns //[[CL:Glossary:false]]//. | ||

+ | |||

+ | ====Examples==== | ||

+ | <blockquote> | ||

+ | ;;; TODO make this runnable | ||

+ | ([[CL:Macros:when]] ([[CL:Functions:math-greater|>]] measured limit) | ||

+ | ([[CL:Special Operators:let]] ((error ([[CL:Functions:round]] ([[CL:Functions:math-multiply|*]] ([[CL:Functions:math-subtract|-]] measured limit) 100) limit))) | ||

+ | ([[CL:Special Operators:unless]] ([[CL:Special Operators:if]] (interactive-stream-p *query-io*) | ||

+ | ([[CL:Functions:yes-or-no-p]] "The frammis is out of tolerance by ~D%[email protected] | ||

+ | Is it safe to proceed? " error) | ||

+ | ([[CL:Functions:math-less|<]] error 15)) ; 15% is acceptable | ||

+ | (<e>error</e> "The frammis is out of tolerance by ~D%." error))) | ||

+ | </blockquote> | ||

+ | |||

+ | ====Affected By==== | ||

+ | None. | ||

+ | |||

+ | ====Exceptional Situations==== | ||

+ | Should signal an error of type type-error if //stream// is not a //[[CL:Glossary:stream]]//. | ||

+ | |||

+ | ====See Also==== | ||

+ | * {\secref\StreamConcepts} | ||

+ | |||

+ | ====Notes==== | ||

+ | None. | ||

+ | |||

+ | \issue{STREAM-CAPABILITIES:INTERACTIVE-STREAM-P} | ||