| 1 |
<html><head><title>XLISP *standard-output*</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> - |
| 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>*standard-output*</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> - </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> - </nobr></td> |
| 30 |
<td width="100%"><nobr>xlinit.c</nobr></td> |
| 31 |
</tr> |
| 32 |
</tbody></table></p> |
| 33 |
|
| 34 |
<h2>Syntax</h2> |
| 35 |
|
| 36 |
<dl> |
| 37 |
<dt> *standard-output*</dt> |
| 38 |
</dl> |
| 39 |
|
| 40 |
<h2>Description</h2> |
| 41 |
|
| 42 |
<p>The *standard-output* system variable contains a file pointer that points |
| 43 |
to the file where all normal printing and messages from XLISP will go. The |
| 44 |
default file for *standard-output* is the system standard output device, |
| 45 |
normally the screen display.</p> |
| 46 |
|
| 47 |
<h2>Examples</h2> |
| 48 |
|
| 49 |
<pre class="example"> |
| 50 |
*standard-output* <font color="#008844">; returns #<File-Stream: #24406></font> |
| 51 |
(setq old-so *standard-output*) <font color="#008844">; save the file pointer</font> |
| 52 |
(setq fp (open "f" :direction :output)) <font color="#008844">; open a new output file</font> |
| 53 |
(setq *standard-output* fp) <font color="#008844">; change where output goes</font> |
| 54 |
|
| 55 |
(+ 2 2) <font color="#008844">; you won't see any messages</font> |
| 56 |
<font color="#008844">; just the echo of input line</font> |
| 57 |
|
| 58 |
(setq *standard-output* old-so) <font color="#008844">; restore standard output</font> |
| 59 |
(close fp) <font color="#008844">; close file</font> |
| 60 |
</pre> |
| 61 |
|
| 62 |
<p><b>Note:</b> Be careful when modifying the *standard-output*, you will |
| 63 |
not be able to see what you are doing. If you do not save the old file |
| 64 |
pointer, you will not be able to return to normal operation and will need to |
| 65 |
exit XLISP.</p> |
| 66 |
|
| 67 |
<p>See the |
| 68 |
<a href="../manual/xlisp-man-011.htm#standard-output">*standard-output*</a> |
| 69 |
system variable in the <nobr>XLISP 2.0</nobr> manual.</p> |
| 70 |
|
| 71 |
<p><nobr> <a href="#top">Back to Top</nobr></a></p> |
| 72 |
|
| 73 |
<hr> |
| 74 |
|
| 75 |
<a href="../start.htm">Nyquist / XLISP 2.0</a> - |
| 76 |
<a href="../manual/contents.htm">Contents</a> | |
| 77 |
<a href="../tutorials/tutorials.htm">Tutorials</a> | |
| 78 |
<a href="../examples/examples.htm">Examples</a> | |
| 79 |
<a href="reference-index.htm">Reference</a> |
| 80 |
|
| 81 |
</body></html> |