Debian Codegraph @

docsrc/xlisp/xlisp-doc/reference/keyword-white-space.htm

raw
1 <html><head><title>XLISP :white-space</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>:white-space</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>keyword</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>xlread.c</nobr></td>
31 </tr>
32 </tbody></table></p>
33
34 <h2>Syntax</h2>
35
36 <dl>
37 <dt>&nbsp;:white-space</dt>
38 </dl>
39
40 <h2>Description</h2>
41
42 <p>The ':white-space' keyword is an entry that is used in the <a
43 href="global-readtable.htm">*readtable*</a> system variable that contains
44 XLISP's data structures relating to the processing of characters from the
45 user [or files] and read-macro expansions. The existance of the
46 ':white-space' keyword means that the specified character may be skipped
47 over. The system defines that 'tab', 'space', 'return' and 'line-feed' are
48 ':white-space' characters.</p>
49
50 <h2>Examples</h2>
51
52 <pre class="example">
53 <font color="#008844">;; define a function to look in a table</font>
54 <font color="#008844">;; and print out any white-space characters</font>
55
56 (defun look-at (table)
57 (dotimes (ch 127)
58 (prog ((entry (aref table ch)))
59 (case entry
60 (nil nil)
61 (:constituent nil)
62 (:white-space (print ch))
63 (t nil))))
64 (terpri))
65
66 (look-at *readtable*) <font color="#008844">; prints 9 - tab</font>
67 <font color="#008844">; 10 - newline</font>
68 <font color="#008844">; 12 - formfeed</font>
69 <font color="#008844">; 13 - return</font>
70 <font color="#008844">; 32 - space</font>
71 </pre>
72
73 <p><b>Caution:</b> If you experiment with
74 <nobr><a href="global-readtable.htm">*readtable*</a> ,</nobr> it is useful
75 to save the old value in a variable, so that you can restore the system
76 state.</p>
77
78 <p>See the
79 <a href="../manual/xlisp-man-008.htm#white-space">:white-space</a>
80 keyword in the <nobr>XLISP 2.0</nobr> manual.</p>
81
82 <p><nobr>&nbsp;&nbsp;<a href="#top">Back to Top</nobr></a></p>
83
84 <hr>
85
86 <a href="../start.htm">Nyquist / XLISP 2.0</a>&nbsp; -&nbsp;
87 <a href="../manual/contents.htm">Contents</a> |
88 <a href="../tutorials/tutorials.htm">Tutorials</a> |
89 <a href="../examples/examples.htm">Examples</a> |
90 <a href="reference-index.htm">Reference</a>
91
92 </body></html>