autodoc.git
/
traditional_manual
/
chapter_21.html
version
»
Context lines:
10
20
40
80
file
none
3
autodoc.git/traditional_manual/chapter_21.html:31846:
<hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Method</span> <span class='homogen--name'><b>soft_cast</b></span> </dt> <dd><p><code><code class='type'>type</code> <b><span class='method'>soft_cast</span>(</b><code class='type'>type</code> <code class='argument'>to</code>, <code class='type'>type</code> <code class='argument'>from</code><b>)</b></code></p></dd> <dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Return the resulting type from a soft cast of <code>from</code> to <code>to</code>.</p> </dd></dl>
+
+
+
<hr />
+
<dl class='group--doc'>
+
<dt class='head--type'><span class='homogen--type'>Method</span>
+
<span class='homogen--name'><b>yield</b></span>
+
</dt>
+
<dd><p><code><code class='datatype'>mixed</code> <b><span class='method'>yield</span>(</b><code class='datatype'>mixed</code> <code class='argument'>val</code><b>)</b></code></p></dd>
+
+
<dt class='head--doc'>Description</dt>
+
<dd class='body--doc'><p>Stop execution of the current generator function for now,
+
and return the value <code>val</code>.</p>
+
</dd>
+
<dt class='head--doc'>Returns</dt>
+
<dd class='body--doc'><p>Evaluates to the first argument passed to the
+
generator function on restart.</p>
+
<p> Calling this special form is similar to the statement:</p>
+
<pre><code>continue return val;</code></pre><p>This syntax is however an expression and can thus be used
+
to pass a value back.</p>
+
</dd>
+
<dt class='head--doc'>Note</dt>
+
<dd class='body--doc'><p>Use of this function is only valid in generator functions.</p>
+
</dd>
+
<dt class='head--doc'>See also</dt>
+
<dd class='body--doc'><p>Generator functions</p>
+
</dd></dl>
<dl><dt><h2 class='header'>Class <b class='ms datatype'>Pike.Annotation</b></h2> </dt><dd><dl class='group--doc'> <dt class='head--doc'>Description</dt> <dd class='body--doc'><p>This class describes the API that the compiler expects for the annotation syntax.</p> </dd> <dt class='head--doc'>Note</dt> <dd class='body--doc'><p>Classes implementing this API typically need to be marked <tt>constant</tt>.</p> </dd>