| 1 |
<html><head><title>XLISP :constituent</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>:constituent</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>keyword</nobr></td> |
| 26 |
</tr> |
| 27 |
<tr valign="top"> |
| 28 |
<td><nobr>Source:</nobr></td> |
| 29 |
<td><nobr> - </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> :constituent</dt> |
| 38 |
</dl> |
| 39 |
|
| 40 |
<h2>Description</h2> |
| 41 |
|
| 42 |
<p>':constituent' is an entry that is used in the |
| 43 |
<a href="global-readtable.htm">*readtable*</a> system variable that |
| 44 |
contains XLISP's data structures relating to the processing of characters |
| 45 |
from the user [or files] and read-macro expansions. The existance of the |
| 46 |
':constituent' keyword means that the specified character is to be used, as |
| 47 |
is, with no further processing. The system defines that the following |
| 48 |
characters are ':constituent' characters:</p> |
| 49 |
|
| 50 |
<pre class="example"> |
| 51 |
0123456789 |
| 52 |
!$%&*+-./:<=>?@[]^_{}~ |
| 53 |
ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| 54 |
abcdefghijklmnopqrstuvwxyz |
| 55 |
</pre> |
| 56 |
|
| 57 |
<h2>Examples</h2> |
| 58 |
|
| 59 |
<pre class="example"> |
| 60 |
(defun look-at (table) <font color="#008844">; define a function to</font> |
| 61 |
(dotimes (ch 127) <font color="#008844">; look in a table</font> |
| 62 |
(prog ((entry (aref table ch))) <font color="#008844">; and print out any</font> |
| 63 |
(case entry <font color="#008844">; entries with a function</font> |
| 64 |
(:CONSTITUENT |
| 65 |
(princ (int-char ch))) |
| 66 |
(T NIL)))) |
| 67 |
(terpri)) |
| 68 |
|
| 69 |
(look-at *readtable*) <font color="#008844">; prints !$%&*+-./0123456789</font> |
| 70 |
<font color="#008844">; :<=>?@ABCDEFGHIJKLM</font> |
| 71 |
<font color="#008844">; NOPQRSTUVWXYZ[]^_ab</font> |
| 72 |
<font color="#008844">; cdefghijklmnopqrstu</font> |
| 73 |
<font color="#008844">; vwxyz{}~</font> |
| 74 |
</pre> |
| 75 |
|
| 76 |
<p><b>Caution:</b> If you experiment with |
| 77 |
<nobr><a href="global-readtable.htm">*readtable*</a> ,</nobr> it is useful to |
| 78 |
save the old value in a variable, so that you can restore the system |
| 79 |
state.</p> |
| 80 |
|
| 81 |
<p>See the |
| 82 |
<a href="../manual/xlisp-man-008.htm#constituent">:constituent</a> |
| 83 |
keyword in the <nobr>XLISP 2.0</nobr> manual.</p> |
| 84 |
|
| 85 |
<p><nobr> <a href="#top">Back to Top</nobr></a></p> |
| 86 |
|
| 87 |
<hr> |
| 88 |
|
| 89 |
<a href="../start.htm">Nyquist / XLISP 2.0</a> - |
| 90 |
<a href="../manual/contents.htm">Contents</a> | |
| 91 |
<a href="../tutorials/tutorials.htm">Tutorials</a> | |
| 92 |
<a href="../examples/examples.htm">Examples</a> | |
| 93 |
<a href="reference-index.htm">Reference</a> |
| 94 |
|
| 95 |
</body></html> |