1
0
Fork 0
cl-sites/novaspec.org/cl/t_broadcast-stream.html
2025-02-05 18:52:26 +01:00

425 lines
No EOL
9.3 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>broadcast-stream | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="t_broadcast-stream.html"
><LINK REL="next" HREF="t_concatenated-stream.html" TYPE="text/html" TITLE="concatenated-stream"
><LINK REL="prev" HREF="t_stream.html" TYPE="text/html" TITLE="stream"
><LINK REL="up" HREF="21_2_Streams_Dictionary.html" TYPE="text/html" TITLE="21.2 Streams Dictionary"
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
><SCRIPT SRC="dpans.js%3F3909942064"
></SCRIPT
><SCRIPT SRC="apropos.js%3F3909942064"
></SCRIPT
></HEAD
><BODY
><DIV
><DIV CLASS="topnav"
><DIV CLASS="breadcrumb"
><SPAN CLASS="breadcrumb-item"
><A HREF="index.html"
>Common Lisp Nova Spec</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="21_Streams.html"
>21. Streams</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="21_2_Streams_Dictionary.html"
>21.2 Streams Dictionary</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="t_broadcast-stream.html"
>broadcast-stream</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="t_stream.html" CLASS="prev"
>&#8592;</A
><SPAN ID="apropos-label"
>Apropos </SPAN
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
><A HREF="t_concatenated-stream.html" CLASS="next"
>&#8594;</A
></DIV
><DIV ID="apropos-res"
></DIV
></DIV
></DIV
><DIV CLASS="matter"
><DIV CLASS="com"
><DIV CLASS="begincom"
><HR
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="broadcast-stream"
></SPAN
><B
>broadcast-stream</B
></TD
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
><I
>System</I
> <I
>Class</I
></TD
></TR
></TABLE
><HR
></DIV
><UL CLASS="subtoc"
></UL
><DL
><DT
><B
>Class Precedence List</B
></DT
><DD
><P CLASS="j"
><A HREF="t_broadcast-stream.html" CLASS="typeref"
><B
>broadcast-stream</B
></A
>, <A HREF="t_stream.html" CLASS="typeref"
><B
>stream</B
></A
>, <A HREF="t_t.html" CLASS="typeref"
><B
>t</B
></A
></P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
>A <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast stream</EM
></A
> is an <A HREF="26_1_Glossary.html#output"
><EM CLASS="term"
>output</EM
></A
> <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>stream</EM
></A
> which has associated with it a set of zero or more <A HREF="26_1_Glossary.html#output"
><EM CLASS="term"
>output</EM
></A
> <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>streams</EM
></A
> such that any output sent to the <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast stream</EM
></A
> gets passed on as output to each of the associated <A HREF="26_1_Glossary.html#output"
><EM CLASS="term"
>output</EM
></A
> <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>streams</EM
></A
>. (If a <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast stream</EM
></A
> has no <EM CLASS="term"
>component streams</EM
>, then all output to the <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast stream</EM
></A
> is discarded.) </P
><P CLASS="j"
>The set of operations that may be performed on a <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast stream</EM
></A
> is the intersection of those for its associated <A HREF="26_1_Glossary.html#output"
><EM CLASS="term"
>output</EM
></A
> <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>streams</EM
></A
>. </P
><P CLASS="j"
>Some output operations (<I CLASS="i"
><I
>e.g.</I
></I
>, <A HREF="f_terpri.html" CLASS="funref"
><B
>fresh-line</B
></A
>) return <A HREF="26_1_Glossary.html#value"
><EM CLASS="term"
>values</EM
></A
> based on the state of the <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>stream</EM
></A
> at the time of the operation. Since these <A HREF="26_1_Glossary.html#value"
><EM CLASS="term"
>values</EM
></A
> might differ for each of the <EM CLASS="term"
>component streams</EM
>, it is necessary to describe their return value specifically:</P
><UL
><LI
><P CLASS="j"
><A HREF="f_stream-element-type.html" CLASS="funref"
><B
>stream-element-type</B
></A
> returns the value from the last component stream, or <A HREF="t_t.html" CLASS="typeref"
><B
>t</B
></A
> if there are no component streams.</P
></LI
><LI
><P CLASS="j"
><A HREF="f_terpri.html" CLASS="funref"
><B
>fresh-line</B
></A
> returns the value from the last component stream, or <SPAN CLASS="misc"
><B
>nil</B
></SPAN
> if there are no component streams.</P
></LI
><LI
><P CLASS="j"
>The functions <A HREF="f_file-length.html" CLASS="funref"
><B
>file-length</B
></A
>, <A HREF="f_file-position.html" CLASS="funref"
><B
>file-position</B
></A
>, <A HREF="f_file-string-length.html" CLASS="funref"
><B
>file-string-length</B
></A
>, and <A HREF="f_stream-external-format.html" CLASS="funref"
><B
>stream-external-format</B
></A
> return the value from the last component stream; if there are no component streams, <A HREF="f_file-length.html" CLASS="funref"
><B
>file-length</B
></A
> and <A HREF="f_file-position.html" CLASS="funref"
><B
>file-position</B
></A
> return <CODE CLASS="f"
>0</CODE
>, <A HREF="f_file-string-length.html" CLASS="funref"
><B
>file-string-length</B
></A
> returns <CODE CLASS="f"
>1</CODE
>, and <A HREF="f_stream-external-format.html" CLASS="funref"
><B
>stream-external-format</B
></A
> returns <SPAN CLASS="kwd"
><SPAN CLASS="cmtt"
>:default</SPAN
></SPAN
>.</P
></LI
><LI
><P CLASS="j"
>The functions <A HREF="f_streamp.html" CLASS="funref"
><B
>streamp</B
></A
> and <A HREF="f_input-stream-p.html" CLASS="funref"
><B
>output-stream-p</B
></A
> always return <A HREF="26_1_Glossary.html#true"
><EM CLASS="term"
>true</EM
></A
> for <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast streams</EM
></A
>.</P
></LI
><LI
><P CLASS="j"
>The functions <A HREF="f_open-stream-p.html" CLASS="funref"
><B
>open-stream-p</B
></A
> tests whether the <A HREF="26_1_Glossary.html#broadcast_stream"
><EM CLASS="term"
>broadcast stream</EM
></A
> is <A HREF="26_1_Glossary.html#open"
><EM CLASS="term"
>open</EM
></A
><SPAN CLASS="meaning"
><SUB CLASS="sub"
><SPAN CLASS="cmr"
>2</SPAN
></SUB
></SPAN
>, not whether its component streams are <A HREF="26_1_Glossary.html#open"
><EM CLASS="term"
>open</EM
></A
>.</P
></LI
><LI
><P CLASS="j"
>The functions <A HREF="f_input-stream-p.html" CLASS="funref"
><B
>input-stream-p</B
></A
> and <EM CLASS="term"
>interactive-stream-p</EM
> return an <A HREF="26_1_Glossary.html#implementation-defined"
><EM CLASS="term"
>implementation-defined</EM
></A
>, <A HREF="26_1_Glossary.html#generalized_boolean"
><EM CLASS="term"
>generalized boolean</EM
></A
> value.</P
></LI
><LI
><P CLASS="j"
>For the input operations <A HREF="f_clear-input.html" CLASS="funref"
><B
>clear-input</B
></A
> <A HREF="f_listen.html" CLASS="funref"
><B
>listen</B
></A
>, <A HREF="f_peek-char.html" CLASS="funref"
><B
>peek-char</B
></A
>, <A HREF="f_read-byte.html" CLASS="funref"
><B
>read-byte</B
></A
>, <A HREF="f_read-char-no-hang.html" CLASS="funref"
><B
>read-char-no-hang</B
></A
>, <A HREF="f_read-char.html" CLASS="funref"
><B
>read-char</B
></A
>, <A HREF="f_read-line.html" CLASS="funref"
><B
>read-line</B
></A
>, and <A HREF="f_unread-char.html" CLASS="funref"
><B
>unread-char</B
></A
>, the consequences are undefined if the indicated operation is performed. However, an <A HREF="26_1_Glossary.html#implementation"
><EM CLASS="term"
>implementation</EM
></A
> is permitted to define such a behavior as an <A HREF="26_1_Glossary.html#implementation-dependent"
><EM CLASS="term"
>implementation-dependent</EM
></A
> extension.</P
></LI
></UL
><P CLASS="j"
>For any output operations not having their return values explicitly specified above or elsewhere in this document, it is defined that the <A HREF="26_1_Glossary.html#value"
><EM CLASS="term"
>values</EM
></A
> returned by such an operation are the <A HREF="26_1_Glossary.html#value"
><EM CLASS="term"
>values</EM
></A
> resulting from performing the operation on the last of its <EM CLASS="term"
>component streams</EM
>; the <A HREF="26_1_Glossary.html#value"
><EM CLASS="term"
>values</EM
></A
> resulting from performing the operation on all preceding <A HREF="26_1_Glossary.html#stream"
><EM CLASS="term"
>streams</EM
></A
> are discarded. If there are no <EM CLASS="term"
>component streams</EM
>, the value is <A HREF="26_1_Glossary.html#implementation-dependent"
><EM CLASS="term"
>implementation-dependent</EM
></A
>.</P
></DD
><DT
><B
>See Also</B
></DT
><DD
><P CLASS="j"
><A HREF="f_broadcast-stream-streams.html" CLASS="funref"
><B
>broadcast-stream-streams</B
></A
>, <A HREF="f_make-broadcast-stream.html" CLASS="funref"
><B
>make-broadcast-stream</B
></A
></P
></DD
></DL
></DIV
></DIV
><DIV CLASS="footer"
><DIV CLASS="btmnav"
><A HREF="t_stream.html" CLASS="prev"
>&#8592;</A
><A HREF="t_concatenated-stream.html" CLASS="next"
>&#8594;</A
></DIV
><DIV CLASS="trail"
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
></DIV
></DIV
><SCRIPT
>domReady();</SCRIPT
></BODY
></HTML
>