| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html> |
| 3 |
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<title>broadcast-stream (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="broadcast-stream (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="broadcast-stream (ANSI and GNU Common Lisp Document)"> |
| 10 |
<meta name="resource-type" content="document"> |
| 11 |
<meta name="distribution" content="global"> |
| 12 |
<meta name="Generator" content="makeinfo"> |
| 13 |
<link href="index.html" rel="start" title="Top"> |
| 14 |
<link href="Streams-Dictionary.html" rel="up" title="Streams Dictionary"> |
| 15 |
<link href="concatenated_002dstream.html" rel="next" title="concatenated-stream"> |
| 16 |
<link href="stream.html" rel="prev" title="stream"> |
| 17 |
<style type="text/css"> |
| 18 |
<!-- |
| 19 |
a.summary-letter {text-decoration: none} |
| 20 |
blockquote.indentedblock {margin-right: 0em} |
| 21 |
div.display {margin-left: 3.2em} |
| 22 |
div.example {margin-left: 3.2em} |
| 23 |
div.lisp {margin-left: 3.2em} |
| 24 |
kbd {font-style: oblique} |
| 25 |
pre.display {font-family: inherit} |
| 26 |
pre.format {font-family: inherit} |
| 27 |
pre.menu-comment {font-family: serif} |
| 28 |
pre.menu-preformatted {font-family: serif} |
| 29 |
span.nolinebreak {white-space: nowrap} |
| 30 |
span.roman {font-family: initial; font-weight: normal} |
| 31 |
span.sansserif {font-family: sans-serif; font-weight: normal} |
| 32 |
ul.no-bullet {list-style: none} |
| 33 |
--> |
| 34 |
</style> |
| 35 |
|
| 36 |
|
| 37 |
</head> |
| 38 |
|
| 39 |
<body lang="en"> |
| 40 |
<span id="broadcast_002dstream"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Next: <a href="concatenated_002dstream.html" accesskey="n" rel="next">concatenated-stream</a>, Previous: <a href="stream.html" accesskey="p" rel="prev">stream</a>, Up: <a href="Streams-Dictionary.html" accesskey="u" rel="up">Streams Dictionary</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="broadcast_002dstream-_005bSystem-Class_005d"></span><h4 class="subsection">21.2.2 broadcast-stream [System Class]</h4> |
| 46 |
|
| 47 |
<span id="Class-Precedence-List_003a_003a-63"></span><h4 class="subsubheading">Class Precedence List::</h4> |
| 48 |
|
| 49 |
<p><b>broadcast-stream</b>, |
| 50 |
<b>stream</b>, |
| 51 |
<b>t</b> |
| 52 |
</p> |
| 53 |
<span id="Description_003a_003a-533"></span><h4 class="subsubheading">Description::</h4> |
| 54 |
|
| 55 |
<p>A <i>broadcast stream</i> is an <i>output</i> <i>stream</i> which |
| 56 |
has associated with it a set of zero or more <i>output</i> <i>streams</i> |
| 57 |
such that any output sent to the <i>broadcast stream</i> gets passed on |
| 58 |
as output to each of the associated <i>output</i> <i>streams</i>. |
| 59 |
(If a <i>broadcast stream</i> has no <i>component streams</i>, |
| 60 |
then all output to the <i>broadcast stream</i> is discarded.) |
| 61 |
</p> |
| 62 |
<p>The set of operations that may be performed on a <i>broadcast stream</i> |
| 63 |
is the intersection of those for its associated <i>output</i> <i>streams</i>. |
| 64 |
</p> |
| 65 |
<p>Some output operations (<i>e.g.</i>, <b>fresh-line</b>) return <i>values</i> based on the |
| 66 |
state of the <i>stream</i> at the time of the operation. |
| 67 |
</p> |
| 68 |
<p>Since these <i>values</i> might differ for each of the <i>component streams</i>, |
| 69 |
it is necessary to describe their return value specifically: |
| 70 |
</p> |
| 71 |
<dl compact="compact"> |
| 72 |
<dt><tt>*</tt></dt> |
| 73 |
<dd><p><b>stream-element-type</b> returns |
| 74 |
the value from the last component stream, |
| 75 |
or <b>t</b> if there are no component streams. |
| 76 |
</p> |
| 77 |
</dd> |
| 78 |
<dt><tt>*</tt></dt> |
| 79 |
<dd><p><b>fresh-line</b> returns |
| 80 |
the value from the last component stream, |
| 81 |
or <b>nil</b> if there are no component streams. |
| 82 |
</p> |
| 83 |
</dd> |
| 84 |
<dt><tt>*</tt></dt> |
| 85 |
<dd><p>The functions |
| 86 |
<b>file-length</b>, |
| 87 |
<b>file-position</b>, |
| 88 |
<b>file-string-length</b>, |
| 89 |
and <b>stream-external-format</b> |
| 90 |
return the value from the last component stream; |
| 91 |
if there are no component streams, |
| 92 |
<b>file-length</b> and <b>file-position</b> return <tt>0</tt>, |
| 93 |
<b>file-string-length</b> returns <tt>1</tt>, |
| 94 |
and <b>stream-external-format</b> returns <tt>:default</tt>. |
| 95 |
</p> |
| 96 |
</dd> |
| 97 |
<dt><tt>*</tt></dt> |
| 98 |
<dd><p>The functions <b>streamp</b> and <b>output-stream-p</b> |
| 99 |
always return <i>true</i> for <i>broadcast streams</i>. |
| 100 |
</p> |
| 101 |
</dd> |
| 102 |
<dt><tt>*</tt></dt> |
| 103 |
<dd><p>The functions <b>open-stream-p</b> tests whether the <i>broadcast stream</i> |
| 104 |
is <i>open</i>_2, not whether its component streams are <i>open</i>. |
| 105 |
</p> |
| 106 |
</dd> |
| 107 |
<dt><tt>*</tt></dt> |
| 108 |
<dd><p>The functions <b>input-stream-p</b> and <i>interactive-stream-p</i> |
| 109 |
return an <i>implementation-defined</i>, <i>generalized boolean</i> value. |
| 110 |
</p> |
| 111 |
</dd> |
| 112 |
<dt><tt>*</tt></dt> |
| 113 |
<dd><p>For the input operations |
| 114 |
<b>clear-input</b> |
| 115 |
<b>listen</b>, |
| 116 |
<b>peek-char</b>, |
| 117 |
<b>read-byte</b>, |
| 118 |
<b>read-char-no-hang</b>, |
| 119 |
<b>read-char</b>, |
| 120 |
<b>read-line</b>, |
| 121 |
and <b>unread-char</b>, |
| 122 |
the consequences are undefined if the indicated operation is performed. |
| 123 |
However, an <i>implementation</i> is permitted |
| 124 |
to define such a behavior as an <i>implementation-dependent</i> extension. |
| 125 |
</p></dd> |
| 126 |
</dl> |
| 127 |
|
| 128 |
<p>For any output operations not having their return values explicitly specified above |
| 129 |
or elsewhere in this document, it is defined that |
| 130 |
the <i>values</i> returned by such an operation are |
| 131 |
the <i>values</i> resulting from performing the operation |
| 132 |
on the last of its <i>component streams</i>; |
| 133 |
the <i>values</i> resulting from performing the operation |
| 134 |
on all preceding <i>streams</i> are discarded. |
| 135 |
If there are no <i>component streams</i>, |
| 136 |
the value is <i>implementation-dependent</i>. |
| 137 |
</p> |
| 138 |
<span id="See-Also_003a_003a-436"></span><h4 class="subsubheading">See Also::</h4> |
| 139 |
|
| 140 |
<p><a href="broadcast_002dstream_002dstreams.html">broadcast-stream-streams</a> |
| 141 |
, |
| 142 |
<a href="make_002dbroadcast_002dstream.html">make-broadcast-stream</a> |
| 143 |
</p> |
| 144 |
<hr> |
| 145 |
<div class="header"> |
| 146 |
<p> |
| 147 |
Next: <a href="concatenated_002dstream.html" accesskey="n" rel="next">concatenated-stream</a>, Previous: <a href="stream.html" accesskey="p" rel="prev">stream</a>, Up: <a href="Streams-Dictionary.html" accesskey="u" rel="up">Streams Dictionary</a> </p> |
| 148 |
</div> |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
</body> |
| 153 |
</html> |