Debian Codegraph @

info/gcl/_002aread_002dsuppress_002a.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>*read-suppress* (ANSI and GNU Common Lisp Document)</title>
7
8 <meta name="description" content="*read-suppress* (ANSI and GNU Common Lisp Document)">
9 <meta name="keywords" content="*read-suppress* (ANSI and GNU Common Lisp Document)">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
13 <link href="index.html" rel="start" title="Top">
14 <link href="Reader-Dictionary.html" rel="up" title="Reader Dictionary">
15 <link href="_002areadtable_002a.html" rel="next" title="*readtable*">
16 <link href="_002aread_002deval_002a.html" rel="prev" title="*read-eval*">
17 <style type="text/css">
18 <!--
19 a.summary-letter {text-decoration: none}
20 blockquote.indentedblock {margin-right: 0em}
21 div.display {margin-left: 3.2em}
22 div.example {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 kbd {font-style: oblique}
25 pre.display {font-family: inherit}
26 pre.format {font-family: inherit}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 span.nolinebreak {white-space: nowrap}
30 span.roman {font-family: initial; font-weight: normal}
31 span.sansserif {font-family: sans-serif; font-weight: normal}
32 ul.no-bullet {list-style: none}
33 -->
34 </style>
35
36
37 </head>
38
39 <body lang="en">
40 <span id="g_t_002aread_002dsuppress_002a"></span><div class="header">
41 <p>
42 Next: <a href="_002areadtable_002a.html" accesskey="n" rel="next">*readtable*</a>, Previous: <a href="_002aread_002deval_002a.html" accesskey="p" rel="prev">*read-eval*</a>, Up: <a href="Reader-Dictionary.html" accesskey="u" rel="up">Reader Dictionary</a> &nbsp; </p>
43 </div>
44 <hr>
45 <span id="g_t_002aread_002dsuppress_002a-_005bVariable_005d"></span><h4 class="subsection">23.2.16 *read-suppress* [Variable]</h4>
46
47 <span id="Value-Type_003a_003a-25"></span><h4 class="subsubheading">Value Type::</h4>
48
49 <p>a <i>generalized boolean</i>.
50 </p>
51 <span id="Initial-Value_003a_003a-25"></span><h4 class="subsubheading">Initial Value::</h4>
52
53 <p><i>false</i>.
54 </p>
55 <span id="Description_003a_003a-635"></span><h4 class="subsubheading">Description::</h4>
56
57 <p>This variable is intended primarily to support the operation of the
58 read-time conditional notations <tt>#+</tt> and <tt>#-</tt>. It is important for the
59 <i>reader macros</i> which implement these notations
60 to be able to skip over the printed representation of an
61 <i>expression</i> despite the possibility that the syntax of the skipped
62 <i>expression</i> may not be entirely valid for the current implementation,
63 since <tt>#+</tt> and <tt>#-</tt> exist in order to allow the same program to be
64 shared among several <span class="roman">Lisp</span> implementations (including dialects other than <span class="roman">Common Lisp</span>)
65 despite small incompatibilities of syntax.
66 </p>
67 <p>If it is <i>false</i>, the <i>Lisp reader</i> operates normally.
68 </p>
69 <p>If the <i>value</i> of <b>*read-suppress*</b> is <i>true</i>,
70 <b>read</b>,
71 <b>read-preserving-whitespace</b>,
72 <b>read-delimited-list</b>,
73 and <b>read-from-string</b>
74 all return a <i>primary value</i> of <b>nil</b> when they complete successfully;
75 however, they continue to parse the representation of an <i>object</i>
76 in the normal way, in order to skip over the <i>object</i>,
77 and continue to indicate <i>end of file</i> in the normal way.
78 Except as noted below,
79 any <i>standardized</i> <i>reader macro</i>_2
80 that is defined to <i>read</i>_2
81 a following <i>object</i> or <i>token</i>
82 will do so,
83 but not signal an error if the <i>object</i>
84 read is not of an appropriate type or syntax.
85 The <i>standard syntax</i> and its associated <i>reader macros</i>
86 will not construct any new <i>objects</i>
87 (<i>e.g.</i>, when reading the representation of a <i>symbol</i>,
88 no <i>symbol</i> will be constructed or interned).
89 </p>
90 <dl compact="compact">
91 <dt>Extended tokens</dt>
92 <dd><p>All extended tokens are completely uninterpreted.
93 Errors such as those that might otherwise be signaled due to
94 detection of invalid <i>potential numbers</i>,
95 invalid patterns of <i>package markers</i>,
96 and invalid uses of the <i>dot</i> character are suppressed.
97 </p>
98 </dd>
99 <dt>Dispatching macro characters (including <i>sharpsign</i>)</dt>
100 <dd><p><i>Dispatching macro characters</i> continue to parse an infix numerical
101 argument, and invoke the dispatch function. The <i>standardized</i>
102 <i>sharpsign</i> <i>reader macros</i> do not enforce any constraints
103 on either the presence of or the value of the numerical argument.
104 </p>
105 </dd>
106 <dt>#=</dt>
107 <dd><p>The <tt>#=</tt> notation is totally ignored. It does not read
108 a following <i>object</i>. It produces no <i>object</i>,
109 but is treated as <i>whitespace</i>_2.
110 </p>
111 </dd>
112 <dt>##</dt>
113 <dd><p>The <tt>##</tt> notation always produces <b>nil</b>.
114 </p></dd>
115 </dl>
116
117 <p>No matter what the <i>value</i> of <b>*read-suppress*</b>,
118 parentheses still continue to delimit and construct <i>lists</i>;
119 the <tt>#(</tt> notation continues to delimit <i>vectors</i>;
120 and comments, <i>strings</i>,
121 and the <i>single-quote</i> and <i>backquote</i> notations continue to be
122 interpreted properly. Such situations as
123 <tt>')</tt>, <tt>#&lt;</tt>,
124 <tt>#)</tt>, and <tt>#&lt;<i>Space</i>&gt;</tt> continue to signal errors.
125 </p>
126 <span id="Examples_003a_003a-455"></span><h4 class="subsubheading">Examples::</h4>
127
128 <div class="example">
129 <pre class="example"> (let ((*read-suppress* t))
130 (mapcar #'read-from-string
131 '(&quot;#(foo bar baz)&quot; &quot;#P(:type :lisp)&quot; &quot;#c1.2&quot;
132 &quot;#.(PRINT 'FOO)&quot; &quot;#3AHELLO&quot; &quot;#S(INTEGER)&quot;
133 &quot;#*ABC&quot; &quot;#\GARBAGE&quot; &quot;#RALPHA&quot; &quot;#3R444&quot;)))
134 &rArr; (NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)
135 </pre></div>
136
137 <span id="See-Also_003a_003a-515"></span><h4 class="subsubheading">See Also::</h4>
138
139 <p><a href="read.html">read</a>
140 ,
141 <a href="Syntax.html">Syntax</a>
142 </p>
143 <span id="Notes_003a_003a-321"></span><h4 class="subsubheading">Notes::</h4>
144
145 <p><i>Programmers</i> and <i>implementations</i> that define additional
146 <i>macro characters</i> are strongly encouraged to make them respect
147 <b>*read-suppress*</b> just as <i>standardized</i> <i>macro characters</i> do.
148 That is, when the <i>value</i> of <b>*read-suppress*</b> is <i>true</i>,
149 they should ignore type errors when reading a following <i>object</i>
150 and the <i>functions</i> that implement <i>dispatching macro characters</i>
151 should tolerate <b>nil</b> as their infix <i>parameter</i> value even if a numeric
152 value would ordinarily be required.
153 </p>
154 <hr>
155 <div class="header">
156 <p>
157 Next: <a href="_002areadtable_002a.html" accesskey="n" rel="next">*readtable*</a>, Previous: <a href="_002aread_002deval_002a.html" accesskey="p" rel="prev">*read-eval*</a>, Up: <a href="Reader-Dictionary.html" accesskey="u" rel="up">Reader Dictionary</a> &nbsp; </p>
158 </div>
159
160
161
162 </body>
163 </html>