Debian Codegraph @

docsrc/xlisp/xlisp-doc/reference/global-rslt.htm

raw
1 <html><head><title>XLISP *rslt*</title>
2
3 <link rel="stylesheet" type="text/css" href="reference.css">
4
5 </head>
6
7 <body>
8
9 <a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
10 <a href="../manual/contents.htm">Contents</a> |
11 <a href="../tutorials/tutorials.htm">Tutorials</a> |
12 <a href="../examples/examples.htm">Examples</a> |
13 <a href="reference-index.htm">Reference</a>
14
15 <hr>
16
17 <h1>*rslt*</h1>
18
19 <hr>
20
21 <p><table cellpadding="0" cellspacing="0" style="margin-left:10px"><tbody>
22 <tr valign="top">
23 <td><nobr>Type:</nobr></td>
24 <td><nobr>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
25 <td width="100%"><nobr>system variable</nobr></td>
26 </tr>
27 <tr valign="top">
28 <td><nobr>Source:</nobr></td>
29 <td><nobr>&nbsp;&nbsp;-&nbsp;&nbsp;</nobr></td>
30 <td width="100%"><nobr>not explicitely defined</nobr></td>
31 </tr>
32 </tbody></table></p>
33
34 <h2>Syntax</h2>
35
36 <p><div class="box">
37
38 <dl>
39 <dt>*rslt*</dt>
40 </dl>
41
42 </div></p>
43
44 <h2>Description</h2>
45
46 <p>When a function returns more than one value, the global Nyquist *rslt*
47 variable is set to a list of the 'extra' values. This provides a
48 <nobr>make-shift</nobr> version of the '<nobr>multiple-value-return</nobr>'
49 facility in <nobr>Common Lisp</nobr>.</p>
50
51 <h2>Examples</h2>
52
53 <pre class="example">
54 (defun cl:values (&amp;rest args)
55 (setq *rslt* args)
56 (first args))
57
58 (values 1 2 3) =&gt; 1
59 *rslt* =&gt; (1 2 3)
60 </pre>
61
62 <p>See <a href="defun.htm">defun</a>, <a href="first.htm">first</a>,
63 <a href="rest.htm">rest</a>,
64 <a href="lambda-keyword-rest.htm">&amp;rest</a>,
65 <a href="setq.htm">setq</a>.</p>
66
67 <p>See also:</p>
68
69 <ul>
70 <li><nobr><a href="../examples/values.htm">Multiple Values</a></nobr></li>
71 </ul>
72
73 <p><nobr>&nbsp;&nbsp;<a href="#top">Back to Top</nobr></a></p>
74
75 <hr>
76
77 <a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
78 <a href="../manual/contents.htm">Contents</a> |
79 <a href="../tutorials/tutorials.htm">Tutorials</a> |
80 <a href="../examples/examples.htm">Examples</a> |
81 <a href="reference-index.htm">Reference</a>
82
83 </body></html>