User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

====== Function STREAM-ELEMENT-TYPE ====== ====Syntax==== * **stream-element-type** //stream// → //typespec// ====Arguments and Values==== * //stream// - a //[[CL:Glossary:stream]]//. * //typespec// - a //[[CL:Glossary:type specifier]]//. ====Description==== **stream-element-type** returns a //[[CL:Glossary:type specifier]]// that indicates the //[[CL:Glossary:type|types]]// of //[[CL:Glossary:object|objects]]// that may be read from or written to //stream//. //[[CL:Glossary:stream|Streams]]// created by **[[CL:Functions:open]]** have an //[[CL:Glossary:element type]]// restricted to **[[CL:Types:integer]]** or a subtype of **[[CL:Types:character]]**. ====Examples==== Note that the //[[CL:Glossary:stream]]// must accomodate at least the specified //[[CL:Glossary:type]]//, but might accomodate other //[[CL:Glossary:type|types]]//. Further note that even if it does accomodate exactly the specified //[[CL:Glossary:type]]//, the //[[CL:Glossary:type]]// might be specified in any of several ways. <blockquote> (with-open-file (s "test" :element-type '(integer 0 1) :if-exists :error :direction :output) (stream-element-type s)) <r>INTEGER </r> <r>//or// (UNSIGNED-BYTE 16) </r> <r>//or// (UNSIGNED-BYTE 8) </r> <r>//or// BIT </r> <r>//or// (UNSIGNED-BYTE 1) </r> <r>//or// (INTEGER 0 1) </r> <r>//or// (INTEGER 0 (2))</r> </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.