User Tools


Differences

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

Link to this comparison view

cl:functions:write-byte [2019/11/11 05:00]
cl:functions:write-byte [2019/11/11 22:00] (current)
Line 1: Line 1:
 +====== Function WRITE-BYTE ======
 +
 +====Syntax====
 +  * **write-byte** //byte stream// → //byte//
 +
 +====Arguments and Values====
 +  * //byte// - an //​[[CL:​Glossary:​integer]]//​ of the //​[[CL:​Glossary:​stream element type]]// of //​[[CL:​Glossary:​stream]]//​.
 +  * //stream// - a //​[[CL:​Glossary:​binary]]//​ //​[[CL:​Glossary:​output]]//​ //​[[CL:​Glossary:​stream]]//​.
 +
 +====Description====
 +**write-byte** writes one byte, //byte//, to //stream//.
 +
 +====Examples====
 +<​blockquote> ​
 +([[CL:​Macros:​with-open-file]] (s "​temp-bytes"​ :direction :​output ​
 +                                :​element-type '​[[CL:​Types:​unsigned-byte]]) ​
 +  (write-byte 101 s)) <​r>​101 </r>
 +</​blockquote>​
 +
 +====Side Effects====
 +//stream// is modified.
 +
 +====Affected By====
 +The //​[[CL:​Glossary:​element type]]// of the //stream//.
 +
 +====Exceptional Situations====
 +Should signal an error of type type-error if //stream// is not a //​[[CL:​Glossary:​stream]]//​. Should signal an error of type **[[CL:​Types:​error]]** if //stream// is not a //​[[CL:​Glossary:​binary]]//​ //​[[CL:​Glossary:​output]]//​ //​[[CL:​Glossary:​stream]]//​.
 +
 +Might signal an error of type **[[CL:​Types:​type-error]]** if //byte// is not an //​[[CL:​Glossary:​integer]]//​ of the //​[[CL:​Glossary:​stream element type]]// of //​[[CL:​Glossary:​stream]]//​.
 +
 +====See Also====
 +  * **[[CL:​Functions:​read-byte|Function READ-BYTE]]**
 +  * **[[CL:​Functions:​write-char|Function WRITE-CHAR]]**
 +  * **[[CL:​Functions:​write-sequence|Function WRITE-SEQUENCE]]**
 +
 +====Notes====
 +None.
 +
 +\issue{READ-AND-WRITE-BYTES:​NEW-FUNCTIONS}