Debian Codegraph @

info/gcl-si/Streams-and-Reading.html

raw ◀ ▶
1 Debian patch touch this file
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.8, https://www.gnu.org/software/texinfo/ -->
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>Streams and Reading (GCL SI Manual)</title>
7
8 <meta name="description" content="Streams and Reading (GCL SI Manual)">
9 <meta name="keywords" content="Streams and Reading (GCL SI Manual)">
10 <meta name="resource-type" content="document">
11 <meta name="distribution" content="global">
12 <meta name="Generator" content="makeinfo">
•13 <meta name="viewport" content="width=device-width,initial-scale=1">
14
15 <link href="index.html" rel="start" title="Top">
16 <link href="Function-and-Variable-Index.html" rel="index" title="Function and Variable Index">
•17 <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
18 <link href="index.html" rel="up" title="Top">
19 <link href="Special-Forms-and-Functions.html" rel="next" title="Special Forms and Functions">
20 <link href="Lists.html" rel="prev" title="Lists">
21 <style type="text/css">
22 <!--
•23 a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
24 a.summary-letter {text-decoration: none}
25 blockquote.indentedblock {margin-right: 0em}
26 div.display {margin-left: 3.2em}
27 div.example {margin-left: 3.2em}
28 kbd {font-style: oblique}
29 pre.display {font-family: inherit}
30 pre.format {font-family: inherit}
31 pre.menu-comment {font-family: serif}
32 pre.menu-preformatted {font-family: serif}
33 span.nolinebreak {white-space: nowrap}
34 span.roman {font-family: initial; font-weight: normal}
35 span.sansserif {font-family: sans-serif; font-weight: normal}
•36 span:hover a.copiable-anchor {visibility: visible}
37 ul.no-bullet {list-style: none}
38 -->
39 </style>
40
41
42 </head>
43
44 <body lang="en">
•45 <div class="chapter" id="Streams-and-Reading">
46 <div class="header">
47 <p>
•48 Next: <a href="Special-Forms-and-Functions.html" accesskey="n" rel="next">Special Forms and Functions</a>, Previous: <a href="Lists.html" accesskey="p" rel="prev">Lists</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p>
49 </div>
50 <hr>
51 <span id="Streams-and-Reading-1"></span><h2 class="chapter">5 Streams and Reading</h2>
52
•53 <dl class="def">
54 <dt id="index-MAKE_002dECHO_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-ECHO-STREAM</strong> <em>(input-stream output-stream)</em><a href='#index-MAKE_002dECHO_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
55 <dd><p>Package:LISP
56 </p>
57 <p>Returns a bidirectional stream which gets its input from INPUT-STREAM and
58 sends its output to OUTPUT-STREAM. In addition, all input is echoed to
59 OUTPUT-STREAM.
60 </p>
61
62 </dd></dl>
63
•64 <dl class="def">
65 <dt id="index-_002aREADTABLE_002a"><span class="category">Variable: </span><span><strong>*READTABLE*</strong><a href='#index-_002aREADTABLE_002a' class='copiable-anchor'> &para;</a></span></dt>
66 <dd><p>Package:LISP
67 The current readtable.
68 </p>
69
70 </dd></dl>
71
•72 <dl class="def">
73 <dt id="index-LOAD"><span class="category">Function: </span><span><strong>LOAD</strong> <em>(filename &amp;key (verbose *load-verbose*) (print nil) (if-does-not-exist :error))</em><a href='#index-LOAD' class='copiable-anchor'> &para;</a></span></dt>
74 <dd><p>Package:LISP
75 </p>
76 <p>Loads the file named by FILENAME into GCL.
77 </p>
78
79 </dd></dl>
80
•81 <dl class="def">
82 <dt id="index-OPEN"><span class="category">Function: </span><span><strong>OPEN</strong> <em>(filename &amp;key (direction :input) (element-type 'string-char) (if-exists :error) (if-does-not-exist :error))</em><a href='#index-OPEN' class='copiable-anchor'> &para;</a></span></dt>
83 <dd><p>Package:LISP
84 </p>
85 <p>Opens the file specified by FILENAME, which may be a string, a pathname,
86 or a stream. Returns a stream for the open file.
87 DIRECTION is :INPUT, :OUTPUT, :IO or :PROBE.
88 ELEMENT-TYPE is STRING-CHAR, (UNSIGNED-BYTE n),
89 UNSIGNED-BYTE, (SIGNED-BYTE n), SIGNED-BYTE, CHARACTER, BIT, (MOD n), or
90 :DEFAULT.
91 IF-EXISTS is :ERROR, :NEW-VERSION, :RENAME,
92 :RENAME-AND-DELETE, :OVERWRITE, :APPEND, :SUPERSEDE, or NIL.
93 IF-DOES-NOT-EXIST is :ERROR, :CREATE, or NIL.
94 </p>
95 <p>If FILENAME begins with a vertical pipe sign: &rsquo;|&rsquo; then the resulting
96 stream is actually a one way pipe. It will be open for reading
97 or writing depending on the direction given. The rest
98 of FILENAME in this case is passed to the /bin/sh command. See
99 the posix description of popen for more details.
100 </p><div class="example">
101 <pre class="example">(setq pipe (open &quot;| wc &lt; /tmp/jim&quot;))
102 (format t &quot;File has ~%d lines&quot; (read pipe))
103 (close pipe)
104 </pre></div>
105
106 </dd></dl>
107
•108 <dl class="def">
109 <dt id="index-_002aPRINT_002dBASE_002a"><span class="category">Variable: </span><span><strong>*PRINT-BASE*</strong><a href='#index-_002aPRINT_002dBASE_002a' class='copiable-anchor'> &para;</a></span></dt>
110 <dd><p>Package:LISP
111 The radix in which the GCL printer prints integers and rationals.
112 The value must be an integer from 2 to 36, inclusive.
113 </p>
114
115 </dd></dl>
116
•117 <dl class="def">
118 <dt id="index-MAKE_002dSTRING_002dINPUT_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-STRING-INPUT-STREAM</strong> <em>(string &amp;optional (start 0) (end (length string)))</em><a href='#index-MAKE_002dSTRING_002dINPUT_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
119 <dd><p>Package:LISP
120 </p>
121 <p>Returns an input stream which will supply the characters of String between
122 Start and End in order.
123 </p>
124
125 </dd></dl>
126
•127 <dl class="def">
128 <dt id="index-PPRINT"><span class="category">Function: </span><span><strong>PPRINT</strong> <em>(object &amp;optional (stream *standard-output*))</em><a href='#index-PPRINT' class='copiable-anchor'> &para;</a></span></dt>
129 <dd><p>Package:LISP
130 </p>
131 <p>Pretty-prints OBJECT. Returns OBJECT. Equivalent to
132 (WRITE :STREAM STREAM :PRETTY T)
133 The SI:PRETTY-PRINT-FORMAT property N (which must be a non-negative integer)
134 of a symbol SYMBOL controls the pretty-printing of form
135 (SYMBOL f1 ... fN fN+1 ... fM)
136 in such a way that the subforms fN+1, ..., fM are regarded as the &rsquo;body&rsquo; of
137 the entire form. For instance, the property value of 2 is initially given
138 to the symbol DO.
139 </p>
140
141 </dd></dl>
142
•143 <dl class="def">
144 <dt id="index-_002aREAD_002dDEFAULT_002dFLOAT_002dFORMAT_002a"><span class="category">Variable: </span><span><strong>*READ-DEFAULT-FLOAT-FORMAT*</strong><a href='#index-_002aREAD_002dDEFAULT_002dFLOAT_002dFORMAT_002a' class='copiable-anchor'> &para;</a></span></dt>
145 <dd><p>Package:LISP
146 The floating-point format the GCL reader uses when reading floating-point
147 numbers that have no exponent marker or have e or E for an exponent marker.
148 Must be one of SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT, and LONG-FLOAT.
149 </p>
150
151 </dd></dl>
152
•153 <dl class="def">
154 <dt id="index-READ_002dPRESERVING_002dWHITESPACE"><span class="category">Function: </span><span><strong>READ-PRESERVING-WHITESPACE</strong> <em>(&amp;optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))</em><a href='#index-READ_002dPRESERVING_002dWHITESPACE' class='copiable-anchor'> &para;</a></span></dt>
155 <dd><p>Package:LISP
156 </p>
157 <p>Reads an object from STREAM, preserving the whitespace that followed the
158 object.
159 </p>
160
161 </dd></dl>
162
•163 <dl class="def">
164 <dt id="index-STREAMP"><span class="category">Function: </span><span><strong>STREAMP</strong> <em>(x)</em><a href='#index-STREAMP' class='copiable-anchor'> &para;</a></span></dt>
165 <dd><p>Package:LISP
166 </p>
167 <p>Returns T if X is a stream object; NIL otherwise.
168 </p>
169
170 </dd></dl>
171
172
•173 <dl class="def">
174 <dt id="index-SET_002dDISPATCH_002dMACRO_002dCHARACTER"><span class="category">Function: </span><span><strong>SET-DISPATCH-MACRO-CHARACTER</strong> <em>(disp-char sub-char function &amp;optional (readtable *readtable*))</em><a href='#index-SET_002dDISPATCH_002dMACRO_002dCHARACTER' class='copiable-anchor'> &para;</a></span></dt>
175 <dd><p>Package:LISP
176 </p>
177 <p>Causes FUNCTION to be called when the DISP-CHAR followed by SUB-CHAR is
178 read.
179 </p>
180
181 </dd></dl>
182
•183 <dl class="def">
184 <dt id="index-WITH_002dOUTPUT_002dTO_002dSTRING"><span class="category">Macro: </span><span><strong>WITH-OUTPUT-TO-STRING</strong><a href='#index-WITH_002dOUTPUT_002dTO_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
185 <dd><p>Package:LISP
186 </p>
187 <p>Syntax:
188 </p><div class="example">
189 <pre class="example">(with-output-to-string (var [string]) {decl}* {form}*)
190 </pre></div>
191
192 <p>Binds VAR to a string output stream that puts characters into STRING, which
193 defaults to a new string. The stream is automatically closed on exit and
194 the string is returned.
195 </p>
196
197 </dd></dl>
198
•199 <dl class="def">
200 <dt id="index-FILE_002dLENGTH"><span class="category">Function: </span><span><strong>FILE-LENGTH</strong> <em>(file-stream)</em><a href='#index-FILE_002dLENGTH' class='copiable-anchor'> &para;</a></span></dt>
201 <dd><p>Package:LISP
202 </p>
203 <p>Returns the length of the specified file stream.
204 </p>
205
206 </dd></dl>
207
•208 <dl class="def">
209 <dt id="index-_002aPRINT_002dCASE_002a"><span class="category">Variable: </span><span><strong>*PRINT-CASE*</strong><a href='#index-_002aPRINT_002dCASE_002a' class='copiable-anchor'> &para;</a></span></dt>
210 <dd><p>Package:LISP
211 The case in which the GCL printer should print ordinary symbols.
212 The value must be one of the keywords :UPCASE, :DOWNCASE, and :CAPITALIZE.
213 </p>
214
215 </dd></dl>
216
•217 <dl class="def">
218 <dt id="index-PRINT"><span class="category">Function: </span><span><strong>PRINT</strong> <em>(object &amp;optional (stream *standard-output*))</em><a href='#index-PRINT' class='copiable-anchor'> &para;</a></span></dt>
219 <dd><p>Package:LISP
220 </p>
221 <p>Outputs a newline character, and then prints OBJECT in the mostly readable
222 representation. Returns OBJECT. Equivalent to
223 (PROGN (TERPRI STREAM) (WRITE OBJECT :STREAM STREAM :ESCAPE T)).
224 </p>
225
226 </dd></dl>
227
•228 <dl class="def">
229 <dt id="index-SET_002dMACRO_002dCHARACTER"><span class="category">Function: </span><span><strong>SET-MACRO-CHARACTER</strong> <em>(char function &amp;optional (non-terminating-p nil) (readtable *readtable*))</em><a href='#index-SET_002dMACRO_002dCHARACTER' class='copiable-anchor'> &para;</a></span></dt>
230 <dd><p>Package:LISP
231 </p>
232 <p>Causes CHAR to be a macro character that, when seen by READ, causes FUNCTION
233 to be called.
234 </p>
235
236 </dd></dl>
237
•238 <dl class="def">
239 <dt id="index-FORCE_002dOUTPUT"><span class="category">Function: </span><span><strong>FORCE-OUTPUT</strong> <em>(&amp;optional (stream *standard-output*))</em><a href='#index-FORCE_002dOUTPUT' class='copiable-anchor'> &para;</a></span></dt>
240 <dd><p>Package:LISP
241 </p>
242 <p>Attempts to force any buffered output to be sent.
243 </p>
244
245 </dd></dl>
246
•247 <dl class="def">
248 <dt id="index-_002aPRINT_002dARRAY_002a"><span class="category">Variable: </span><span><strong>*PRINT-ARRAY*</strong><a href='#index-_002aPRINT_002dARRAY_002a' class='copiable-anchor'> &para;</a></span></dt>
249 <dd><p>Package:LISP
250 Whether the GCL printer should print array elements.
251 </p>
252
253 </dd></dl>
254
•255 <dl class="def">
256 <dt id="index-STREAM_002dELEMENT_002dTYPE"><span class="category">Function: </span><span><strong>STREAM-ELEMENT-TYPE</strong> <em>(stream)</em><a href='#index-STREAM_002dELEMENT_002dTYPE' class='copiable-anchor'> &para;</a></span></dt>
257 <dd><p>Package:LISP
258 </p>
259 <p>Returns a type specifier for the kind of object returned by STREAM.
260 </p>
261
262 </dd></dl>
263
•264 <dl class="def">
265 <dt id="index-WRITE_002dBYTE"><span class="category">Function: </span><span><strong>WRITE-BYTE</strong> <em>(integer stream)</em><a href='#index-WRITE_002dBYTE' class='copiable-anchor'> &para;</a></span></dt>
266 <dd><p>Package:LISP
267 </p>
268 <p>Outputs INTEGER to the binary stream STREAM. Returns INTEGER.
269 </p>
270
271 </dd></dl>
272
•273 <dl class="def">
274 <dt id="index-MAKE_002dCONCATENATED_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-CONCATENATED-STREAM</strong> <em>(&amp;rest streams)</em><a href='#index-MAKE_002dCONCATENATED_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
275 <dd><p>Package:LISP
276 </p>
277 <p>Returns a stream which takes its input from each of the STREAMs in turn,
278 going on to the next at end of stream.
279 </p>
280
281 </dd></dl>
282
•283 <dl class="def">
284 <dt id="index-PRIN1"><span class="category">Function: </span><span><strong>PRIN1</strong> <em>(object &amp;optional (stream *standard-output*))</em><a href='#index-PRIN1' class='copiable-anchor'> &para;</a></span></dt>
285 <dd><p>Package:LISP
286 </p>
287 <p>Prints OBJECT in the mostly readable representation. Returns OBJECT.
288 Equivalent to (WRITE OBJECT :STREAM STREAM :ESCAPE T).
289 </p>
290
291 </dd></dl>
292
•293 <dl class="def">
294 <dt id="index-PRINC"><span class="category">Function: </span><span><strong>PRINC</strong> <em>(object &amp;optional (stream *standard-output*))</em><a href='#index-PRINC' class='copiable-anchor'> &para;</a></span></dt>
295 <dd><p>Package:LISP
296 </p>
297 <p>Prints OBJECT without escape characters. Returns OBJECT. Equivalent to
298 (WRITE OBJECT :STREAM STREAM :ESCAPE NIL).
299 </p>
300
301 </dd></dl>
302
•303 <dl class="def">
304 <dt id="index-CLEAR_002dOUTPUT"><span class="category">Function: </span><span><strong>CLEAR-OUTPUT</strong> <em>(&amp;optional (stream *standard-output*))</em><a href='#index-CLEAR_002dOUTPUT' class='copiable-anchor'> &para;</a></span></dt>
305 <dd><p>Package:LISP
306 </p>
307 <p>Clears the output stream STREAM.
308 </p>
309
310 </dd></dl>
311
•312 <dl class="def">
313 <dt id="index-TERPRI"><span class="category">Function: </span><span><strong>TERPRI</strong> <em>(&amp;optional (stream *standard-output*))</em><a href='#index-TERPRI' class='copiable-anchor'> &para;</a></span></dt>
314 <dd><p>Package:LISP
315 </p>
316 <p>Outputs a newline character.
317 </p>
318
319 </dd></dl>
320
•321 <dl class="def">
322 <dt id="index-FINISH_002dOUTPUT"><span class="category">Function: </span><span><strong>FINISH-OUTPUT</strong> <em>(&amp;optional (stream *standard-output*))</em><a href='#index-FINISH_002dOUTPUT' class='copiable-anchor'> &para;</a></span></dt>
323 <dd><p>Package:LISP
324 </p>
325 <p>Attempts to ensure that all output sent to STREAM has reached its destination,
326 and only then returns.
327 </p>
328
329 </dd></dl>
330
•331 <dl class="def">
332 <dt id="index-WITH_002dOPEN_002dFILE"><span class="category">Macro: </span><span><strong>WITH-OPEN-FILE</strong><a href='#index-WITH_002dOPEN_002dFILE' class='copiable-anchor'> &para;</a></span></dt>
333 <dd><p>Package:LISP
334 </p>
335 <p>Syntax:
336 </p><div class="example">
337 <pre class="example">(with-open-file (stream filename {options}*) {decl}* {form}*)
338 </pre></div>
339
340 <p>Opens the file whose name is FILENAME, using OPTIONs, and binds the variable
341 STREAM to a stream to/from the file. Then evaluates FORMs as a PROGN.
342 The file is automatically closed on exit.
343 </p>
344
345 </dd></dl>
346
•347 <dl class="def">
348 <dt id="index-DO"><span class="category">Special Form: </span><span><strong>DO</strong><a href='#index-DO' class='copiable-anchor'> &para;</a></span></dt>
349 <dd><p>Package:LISP
350 </p>
351 <p>Syntax:
352 </p><div class="example">
353 <pre class="example">(do ({(var [init [step]])}*) (endtest {result}*)
354 {decl}* {tag | statement}*)
355 </pre></div>
356
357 <p>Creates a NIL block, binds each VAR to the value of the corresponding INIT,
358 and then executes STATEMENTs repeatedly until ENDTEST is satisfied. After
359 each iteration, assigns to each VAR the value of the corresponding STEP. When
360 ENDTEST is satisfied, evaluates RESULTs as a PROGN and returns the value(s) of
361 the last RESULT (or NIL if no RESULTs are supplied). Performs variable
362 bindings and assignments all at once, just like LET and PSETQ do.
363 </p>
364
365 </dd></dl>
366
•367 <dl class="def">
368 <dt id="index-READ_002dFROM_002dSTRING"><span class="category">Function: </span><span><strong>READ-FROM-STRING</strong> <em>(string &amp;optional (eof-error-p t) (eof-value nil) &amp;key (start 0) (end (length string)) (preserve-whitespace nil))</em><a href='#index-READ_002dFROM_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
369 <dd><p>Package:LISP
370 </p>
371 <p>Reads an object from STRING.
372 </p>
373
374 </dd></dl>
375
•376 <dl class="def">
377 <dt id="index-WRITE_002dSTRING"><span class="category">Function: </span><span><strong>WRITE-STRING</strong> <em>(string &amp;optional (stream *standard-output*) &amp;key (start 0) (end (length string)))</em><a href='#index-WRITE_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
378 <dd><p>Package:LISP
379 </p>
380 <p>Outputs STRING and returns it.
381 </p>
382
383 </dd></dl>
384
•385 <dl class="def">
386 <dt id="index-_002aPRINT_002dLEVEL_002a"><span class="category">Variable: </span><span><strong>*PRINT-LEVEL*</strong><a href='#index-_002aPRINT_002dLEVEL_002a' class='copiable-anchor'> &para;</a></span></dt>
387 <dd><p>Package:LISP
388 How many levels deep the GCL printer should print. Unlimited if NIL.
389 </p>
390
391 </dd></dl>
392
•393 <dl class="def">
394 <dt id="index-_002aPRINT_002dRADIX_002a"><span class="category">Variable: </span><span><strong>*PRINT-RADIX*</strong><a href='#index-_002aPRINT_002dRADIX_002a' class='copiable-anchor'> &para;</a></span></dt>
395 <dd><p>Package:LISP
396 Whether the GCL printer should print the radix indicator when printing
397 integers and rationals.
398 </p>
399
400 </dd></dl>
401
•402 <dl class="def">
403 <dt id="index-Y_002dOR_002dN_002dP"><span class="category">Function: </span><span><strong>Y-OR-N-P</strong> <em>(&amp;optional (format-string nil) &amp;rest args)</em><a href='#index-Y_002dOR_002dN_002dP' class='copiable-anchor'> &para;</a></span></dt>
404 <dd><p>Package:LISP
405 </p>
406 <p>Asks the user a question whose answer is either &rsquo;Y&rsquo; or &rsquo;N&rsquo;. If FORMAT-STRING
407 is non-NIL, then FRESH-LINE operation is performed, a message is printed as
408 if FORMAT-STRING and ARGs were given to FORMAT, and then a prompt
409 &quot;(Y or N)&quot; is printed. Otherwise, no prompt will appear.
410 </p>
411
412 </dd></dl>
413
•414 <dl class="def">
415 <dt id="index-MAKE_002dBROADCAST_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-BROADCAST-STREAM</strong> <em>(&amp;rest streams)</em><a href='#index-MAKE_002dBROADCAST_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
416 <dd><p>Package:LISP
417 </p>
418 <p>Returns an output stream which sends its output to all of the given streams.
419 </p>
420
421 </dd></dl>
422
•423 <dl class="def">
424 <dt id="index-READ_002dCHAR"><span class="category">Function: </span><span><strong>READ-CHAR</strong> <em>(&amp;optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))</em><a href='#index-READ_002dCHAR' class='copiable-anchor'> &para;</a></span></dt>
425 <dd><p>Package:LISP
426 </p>
427 <p>Reads a character from STREAM.
428 </p>
429
430 </dd></dl>
431
•432 <dl class="def">
433 <dt id="index-PEEK_002dCHAR"><span class="category">Function: </span><span><strong>PEEK-CHAR</strong> <em>(&amp;optional (peek-type nil) (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))</em><a href='#index-PEEK_002dCHAR' class='copiable-anchor'> &para;</a></span></dt>
434 <dd><p>Package:LISP
435 </p>
436 <p>Peeks at the next character in the input stream STREAM.
437 </p>
438
439 </dd></dl>
440
•441 <dl class="def">
442 <dt id="index-OUTPUT_002dSTREAM_002dP"><span class="category">Function: </span><span><strong>OUTPUT-STREAM-P</strong> <em>(stream)</em><a href='#index-OUTPUT_002dSTREAM_002dP' class='copiable-anchor'> &para;</a></span></dt>
443 <dd><p>Package:LISP
444 </p>
445 <p>Returns non-nil if STREAM can handle output operations; NIL otherwise.
446 </p>
447
448 </dd></dl>
449
•450 <dl class="def">
451 <dt id="index-_002aQUERY_002dIO_002a"><span class="category">Variable: </span><span><strong>*QUERY-IO*</strong><a href='#index-_002aQUERY_002dIO_002a' class='copiable-anchor'> &para;</a></span></dt>
452 <dd><p>Package:LISP
453 The query I/O stream.
454 </p>
455
456 </dd></dl>
457
•458 <dl class="def">
459 <dt id="index-_002aREAD_002dBASE_002a"><span class="category">Variable: </span><span><strong>*READ-BASE*</strong><a href='#index-_002aREAD_002dBASE_002a' class='copiable-anchor'> &para;</a></span></dt>
460 <dd><p>Package:LISP
461 The radix that the GCL reader reads numbers in.
462 </p>
463
464 </dd></dl>
465
•466 <dl class="def">
467 <dt id="index-WITH_002dOPEN_002dSTREAM"><span class="category">Macro: </span><span><strong>WITH-OPEN-STREAM</strong><a href='#index-WITH_002dOPEN_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
468 <dd><p>Package:LISP
469 </p>
470 <p>Syntax:
471 </p><div class="example">
472 <pre class="example">(with-open-stream (var stream) {decl}* {form}*)
473 </pre></div>
474
475 <p>Evaluates FORMs as a PROGN with VAR bound to the value of STREAM. The stream
476 is automatically closed on exit.
477 </p>
478
479 </dd></dl>
480
•481 <dl class="def">
482 <dt id="index-WITH_002dINPUT_002dFROM_002dSTRING"><span class="category">Macro: </span><span><strong>WITH-INPUT-FROM-STRING</strong><a href='#index-WITH_002dINPUT_002dFROM_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
483 <dd><p>Package:LISP
484 </p>
485 <p>Syntax:
486 </p><div class="example">
487 <pre class="example">(with-input-from-string (var string {keyword value}*) {decl}*
488 {form}*)
489 </pre></div>
490
491 <p>Binds VAR to an input stream that returns characters from STRING and evaluates
492 the FORMs. The stream is automatically closed on exit. Allowed keywords are
493 :INDEX, :START, and :END.
494 </p>
495
496 </dd></dl>
497
•498 <dl class="def">
499 <dt id="index-CLEAR_002dINPUT"><span class="category">Function: </span><span><strong>CLEAR-INPUT</strong> <em>(&amp;optional (stream *standard-input*))</em><a href='#index-CLEAR_002dINPUT' class='copiable-anchor'> &para;</a></span></dt>
500 <dd><p>Package:LISP
501 Clears the input
502 stream STREAM.
503 </p>
504
505 </dd></dl>
506
•507 <dl class="def">
508 <dt id="index-_002aTERMINAL_002dIO_002a"><span class="category">Variable: </span><span><strong>*TERMINAL-IO*</strong><a href='#index-_002aTERMINAL_002dIO_002a' class='copiable-anchor'> &para;</a></span></dt>
509 <dd><p>Package:LISP
510 The terminal I/O stream.
511 </p>
512
513 </dd></dl>
514
•515 <dl class="def">
516 <dt id="index-LISTEN"><span class="category">Function: </span><span><strong>LISTEN</strong> <em>(&amp;optional (stream *standard-input*))</em><a href='#index-LISTEN' class='copiable-anchor'> &para;</a></span></dt>
517 <dd><p>Package:LISP
518 </p>
519 <p>Returns T if a character is available on STREAM; NIL otherwise. This function
520 does not correctly work in some versions of GCL because of the lack of such
521 mechanism in the underlying operating system.
522 </p>
523
524 </dd></dl>
525
•526 <dl class="def">
527 <dt id="index-MAKE_002dPATHNAME"><span class="category">Function: </span><span><strong>MAKE-PATHNAME</strong> <em>(&amp;key (defaults (parse-namestring &quot;&quot; (pathname-host *default-pathname-defaults*))) (host (pathname-host defaults)) (device (pathname-device defaults)) (directory (pathname-directory defaults)) (name (pathname-name defaults)) (type (pathname-type defaults)) (version (pathname-version defaults)))</em><a href='#index-MAKE_002dPATHNAME' class='copiable-anchor'> &para;</a></span></dt>
528 <dd><p>Package:LISP
529 </p>
530 <p>Create a pathname from HOST, DEVICE, DIRECTORY, NAME, TYPE and VERSION.
531 </p>
532
533 </dd></dl>
534
•535 <dl class="def">
536 <dt id="index-PATHNAME_002dTYPE"><span class="category">Function: </span><span><strong>PATHNAME-TYPE</strong> <em>(pathname)</em><a href='#index-PATHNAME_002dTYPE' class='copiable-anchor'> &para;</a></span></dt>
537 <dd><p>Package:LISP
538 </p>
539 <p>Returns the type slot of PATHNAME.
540 </p>
541
542 </dd></dl>
543
•544 <dl class="def">
545 <dt id="index-_002aPRINT_002dGENSYM_002a"><span class="category">Variable: </span><span><strong>*PRINT-GENSYM*</strong><a href='#index-_002aPRINT_002dGENSYM_002a' class='copiable-anchor'> &para;</a></span></dt>
546 <dd><p>Package:LISP
547 Whether the GCL printer should prefix symbols with no home package
548 with &quot;#:&quot;.
549 </p>
550
551 </dd></dl>
552
•553 <dl class="def">
554 <dt id="index-READ_002dLINE"><span class="category">Function: </span><span><strong>READ-LINE</strong> <em>(&amp;optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))</em><a href='#index-READ_002dLINE' class='copiable-anchor'> &para;</a></span></dt>
555 <dd><p>Package:LISP
556 </p>
557 <p>Returns a line of text read from STREAM as a string, discarding the newline
558 character.
559 </p>
560 <p>Note that when using line at a time input under unix,
561 input forms will always be followed by a #\newline. Thus if you
562 do
563 </p>
564 <p>&gt;(read-line)
565 &quot;&quot;
566 nil
567 </p>
568 <p>the empty string will be returned. After lisp reads the (read-line)
569 it then invokes (read-line). This happens before it does anything
570 else and so happens before the newline character immediately following
571 (read-line) has been read. Thus read-line immediately encounters a
572 #\newline and so returns the empty string. If there had been other
573 characters before the #\newline it would have been different:
574 </p>
575 <p>&gt;(read-line) how are you
576 &quot; how are you&quot;
577 nil
578 </p>
579 <p>If you want to throw away &quot;&quot; input, you can do that with
580 the following:
581 </p>
582 <p>(sloop::sloop while (equal (setq input (read-line)) &quot;&quot;))
583 </p>
584 <p>You may also want to use character at a time input, but that
585 makes input editing harder.
586 nicolas% stty cbreak
587 nicolas% gcl
588 GCL (GNU Common Lisp) Version(1.1.2) Mon Jan 9 12:58:22 MET 1995
589 Licensed under GNU Public Library License
590 Contains Enhancements by W. Schelter
591 </p>
592 <p>&gt;(let ((ifilename nil))
593 (format t &quot;~%Input file name: &quot;)
594 (setq ifilename (read-line)))
595 Input file name: /tmp/myfile
596 &quot;/tmp/myfile&quot;
597 </p>
598 <p>&gt;(bye)Bye.
599 </p>
600
601
602
603 </dd></dl>
604
•605 <dl class="def">
606 <dt id="index-WRITE_002dTO_002dSTRING"><span class="category">Function: </span><span><strong>WRITE-TO-STRING</strong> <em>(object &amp;key (escape *print-escape*) (radix *print-radix*) (base *print-base*) (circle *print-circle*) (pretty *print-pretty*) (level *print-level*) (length *print-length*) (case *print-case*) (array *print-array*) (gensym *print-gensym*))</em><a href='#index-WRITE_002dTO_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
607 <dd><p>Package:LISP
608 </p>
609 <p>Returns as a string the printed representation of OBJECT in the specified
610 mode. See the variable docs of *PRINT-...* for the mode.
611 </p>
612
613 </dd></dl>
614
•615 <dl class="def">
616 <dt id="index-PATHNAMEP"><span class="category">Function: </span><span><strong>PATHNAMEP</strong> <em>(x)</em><a href='#index-PATHNAMEP' class='copiable-anchor'> &para;</a></span></dt>
617 <dd><p>Package:LISP
618 </p>
619 <p>Returns T if X is a pathname object; NIL otherwise.
620 </p>
621
622 </dd></dl>
623
•624 <dl class="def">
625 <dt id="index-READTABLEP"><span class="category">Function: </span><span><strong>READTABLEP</strong> <em>(x)</em><a href='#index-READTABLEP' class='copiable-anchor'> &para;</a></span></dt>
626 <dd><p>Package:LISP
627 </p>
628 <p>Returns T if X is a readtable object; NIL otherwise.
629 </p>
630
631 </dd></dl>
632
•633 <dl class="def">
634 <dt id="index-READ"><span class="category">Function: </span><span><strong>READ</strong> <em>(&amp;optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursivep nil))</em><a href='#index-READ' class='copiable-anchor'> &para;</a></span></dt>
635 <dd><p>Package:LISP
636 </p>
637 <p>Reads in the next object from STREAM.
638 </p>
639
640 </dd></dl>
641
•642 <dl class="def">
643 <dt id="index-NAMESTRING"><span class="category">Function: </span><span><strong>NAMESTRING</strong> <em>(pathname)</em><a href='#index-NAMESTRING' class='copiable-anchor'> &para;</a></span></dt>
644 <dd><p>Package:LISP
645 </p>
646 <p>Returns the full form of PATHNAME as a string.
647 </p>
648
649 </dd></dl>
650
•651 <dl class="def">
652 <dt id="index-UNREAD_002dCHAR"><span class="category">Function: </span><span><strong>UNREAD-CHAR</strong> <em>(character &amp;optional (stream *standard-input*))</em><a href='#index-UNREAD_002dCHAR' class='copiable-anchor'> &para;</a></span></dt>
653 <dd><p>Package:LISP
654 </p>
655 <p>Puts CHARACTER back on the front of the input stream STREAM.
656 </p>
657
658 </dd></dl>
659
•660 <dl class="def">
661 <dt id="index-CLOSE"><span class="category">Function: </span><span><strong>CLOSE</strong> <em>(stream &amp;key (abort nil))</em><a href='#index-CLOSE' class='copiable-anchor'> &para;</a></span></dt>
662 <dd><p>Package:LISP
663 </p>
664 <p>Closes STREAM. A non-NIL value of :ABORT indicates an abnormal termination.
665 </p>
666
667 </dd></dl>
668
•669 <dl class="def">
670 <dt id="index-_002aPRINT_002dLENGTH_002a"><span class="category">Variable: </span><span><strong>*PRINT-LENGTH*</strong><a href='#index-_002aPRINT_002dLENGTH_002a' class='copiable-anchor'> &para;</a></span></dt>
671 <dd><p>Package:LISP
672 How many elements the GCL printer should print at each level of nested data
673 object. Unlimited if NIL.
674 </p>
675
676 </dd></dl>
677
•678 <dl class="def">
679 <dt id="index-SET_002dSYNTAX_002dFROM_002dCHAR"><span class="category">Function: </span><span><strong>SET-SYNTAX-FROM-CHAR</strong> <em>(to-char from-char &amp;optional (to-readtable *readtable*) (from-readtable nil))</em><a href='#index-SET_002dSYNTAX_002dFROM_002dCHAR' class='copiable-anchor'> &para;</a></span></dt>
680 <dd><p>Package:LISP
681 </p>
682 <p>Makes the syntax of TO-CHAR in TO-READTABLE be the same as the syntax of
683 FROM-CHAR in FROM-READTABLE.
684 </p>
685
686 </dd></dl>
687
•688 <dl class="def">
689 <dt id="index-INPUT_002dSTREAM_002dP"><span class="category">Function: </span><span><strong>INPUT-STREAM-P</strong> <em>(stream)</em><a href='#index-INPUT_002dSTREAM_002dP' class='copiable-anchor'> &para;</a></span></dt>
690 <dd><p>Package:LISP
691 </p>
692 <p>Returns non-NIL if STREAM can handle input operations; NIL otherwise.
693 </p>
694
695 </dd></dl>
696
•697 <dl class="def">
698 <dt id="index-PATHNAME"><span class="category">Function: </span><span><strong>PATHNAME</strong> <em>(x)</em><a href='#index-PATHNAME' class='copiable-anchor'> &para;</a></span></dt>
699 <dd><p>Package:LISP
700 </p>
701 <p>Turns X into a pathname. X may be a string, symbol, stream, or pathname.
702 </p>
703
704 </dd></dl>
705
•706 <dl class="def">
707 <dt id="index-FILE_002dNAMESTRING"><span class="category">Function: </span><span><strong>FILE-NAMESTRING</strong> <em>(pathname)</em><a href='#index-FILE_002dNAMESTRING' class='copiable-anchor'> &para;</a></span></dt>
708 <dd><p>Package:LISP
709 </p>
710 <p>Returns the written representation of PATHNAME as a string.
711 </p>
712
713 </dd></dl>
714
•715 <dl class="def">
716 <dt id="index-MAKE_002dDISPATCH_002dMACRO_002dCHARACTER"><span class="category">Function: </span><span><strong>MAKE-DISPATCH-MACRO-CHARACTER</strong> <em>(char &amp;optional (non-terminating-p nil) (readtable *readtable*))</em><a href='#index-MAKE_002dDISPATCH_002dMACRO_002dCHARACTER' class='copiable-anchor'> &para;</a></span></dt>
717 <dd><p>Package:LISP
718 </p>
719 <p>Causes the character CHAR to be a dispatching macro character in READTABLE.
720 </p>
721
722 </dd></dl>
723
•724 <dl class="def">
725 <dt id="index-_002aSTANDARD_002dOUTPUT_002a"><span class="category">Variable: </span><span><strong>*STANDARD-OUTPUT*</strong><a href='#index-_002aSTANDARD_002dOUTPUT_002a' class='copiable-anchor'> &para;</a></span></dt>
726 <dd><p>Package:LISP
727 The default output stream used by the GCL printer.
728 </p>
729
730 </dd></dl>
731
•732 <dl class="def">
733 <dt id="index-MAKE_002dTWO_002dWAY_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-TWO-WAY-STREAM</strong> <em>(input-stream output-stream)</em><a href='#index-MAKE_002dTWO_002dWAY_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
734 <dd><p>Package:LISP
735 </p>
736 <p>Returns a bidirectional stream which gets its input from INPUT-STREAM and
737 sends its output to OUTPUT-STREAM.
738 </p>
739
740 </dd></dl>
741
•742 <dl class="def">
743 <dt id="index-_002aPRINT_002dESCAPE_002a"><span class="category">Variable: </span><span><strong>*PRINT-ESCAPE*</strong><a href='#index-_002aPRINT_002dESCAPE_002a' class='copiable-anchor'> &para;</a></span></dt>
744 <dd><p>Package:LISP
745 Whether the GCL printer should put escape characters whenever appropriate.
746 </p>
747
748 </dd></dl>
749
•750 <dl class="def">
751 <dt id="index-COPY_002dREADTABLE"><span class="category">Function: </span><span><strong>COPY-READTABLE</strong> <em>(&amp;optional (from-readtable *readtable*) (to-readtable nil))</em><a href='#index-COPY_002dREADTABLE' class='copiable-anchor'> &para;</a></span></dt>
752 <dd><p>Package:LISP
753 </p>
754 <p>Returns a copy of the readtable FROM-READTABLE. If TO-READTABLE is non-NIL,
755 then copies into TO-READTABLE. Otherwise, creates a new readtable.
756 </p>
757
758 </dd></dl>
759
•760 <dl class="def">
761 <dt id="index-DIRECTORY_002dNAMESTRING"><span class="category">Function: </span><span><strong>DIRECTORY-NAMESTRING</strong> <em>(pathname)</em><a href='#index-DIRECTORY_002dNAMESTRING' class='copiable-anchor'> &para;</a></span></dt>
762 <dd><p>Package:LISP
763 </p>
764 <p>Returns the directory part of PATHNAME as a string.
765 </p>
766
767 </dd></dl>
768
•769 <dl class="def">
770 <dt id="index-TRUENAME"><span class="category">Function: </span><span><strong>TRUENAME</strong> <em>(pathname)</em><a href='#index-TRUENAME' class='copiable-anchor'> &para;</a></span></dt>
771 <dd><p>Package:LISP
772 </p>
773 <p>Returns the pathname for the actual file described by PATHNAME.
774 </p>
775
776 </dd></dl>
777
•778 <dl class="def">
779 <dt id="index-_002aREAD_002dSUPPRESS_002a"><span class="category">Variable: </span><span><strong>*READ-SUPPRESS*</strong><a href='#index-_002aREAD_002dSUPPRESS_002a' class='copiable-anchor'> &para;</a></span></dt>
780 <dd><p>Package:LISP
781 When the value of this variable is NIL, the GCL reader operates normally.
782 When it is non-NIL, then the reader parses input characters but much of what
783 is read is not interpreted.
784 </p>
785
786 </dd></dl>
787
•788 <dl class="def">
789 <dt id="index-GET_002dDISPATCH_002dMACRO_002dCHARACTER"><span class="category">Function: </span><span><strong>GET-DISPATCH-MACRO-CHARACTER</strong> <em>(disp-char sub-char &amp;optional (readtable *readtable*))</em><a href='#index-GET_002dDISPATCH_002dMACRO_002dCHARACTER' class='copiable-anchor'> &para;</a></span></dt>
790 <dd><p>Package:LISP
791 </p>
792 <p>Returns the macro-character function for SUB-CHAR under DISP-CHAR.
793 </p>
794
795 </dd></dl>
796
•797 <dl class="def">
798 <dt id="index-PATHNAME_002dDEVICE"><span class="category">Function: </span><span><strong>PATHNAME-DEVICE</strong> <em>(pathname)</em><a href='#index-PATHNAME_002dDEVICE' class='copiable-anchor'> &para;</a></span></dt>
799 <dd><p>Package:LISP
800 </p>
801 <p>Returns the device slot of PATHNAME.
802 </p>
803
804 </dd></dl>
805
•806 <dl class="def">
807 <dt id="index-READ_002dCHAR_002dNO_002dHANG"><span class="category">Function: </span><span><strong>READ-CHAR-NO-HANG</strong> <em>(&amp;optional (stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil))</em><a href='#index-READ_002dCHAR_002dNO_002dHANG' class='copiable-anchor'> &para;</a></span></dt>
808 <dd><p>Package:LISP
809 </p>
810 <p>Returns the next character from STREAM if one is available; NIL otherwise.
811 </p>
812
813 </dd></dl>
814
•815 <dl class="def">
816 <dt id="index-FRESH_002dLINE"><span class="category">Function: </span><span><strong>FRESH-LINE</strong> <em>(&amp;optional (stream *standard-output*))</em><a href='#index-FRESH_002dLINE' class='copiable-anchor'> &para;</a></span></dt>
817 <dd><p>Package:LISP
818 </p>
819 <p>Outputs a newline if it is not positioned at the beginning of a line. Returns
820 T if it output a newline; NIL otherwise.
821 </p>
822
823 </dd></dl>
824
•825 <dl class="def">
826 <dt id="index-WRITE_002dCHAR"><span class="category">Function: </span><span><strong>WRITE-CHAR</strong> <em>(char &amp;optional (stream *standard-output*))</em><a href='#index-WRITE_002dCHAR' class='copiable-anchor'> &para;</a></span></dt>
827 <dd><p>Package:LISP
828 </p>
829 <p>Outputs CHAR and returns it.
830 </p>
831
832 </dd></dl>
833
•834 <dl class="def">
835 <dt id="index-PARSE_002dNAMESTRING"><span class="category">Function: </span><span><strong>PARSE-NAMESTRING</strong> <em>(thing &amp;optional host (defaults *default-pathname-defaults*) &amp;key (start 0) (end (length thing)) (junk-allowed nil))</em><a href='#index-PARSE_002dNAMESTRING' class='copiable-anchor'> &para;</a></span></dt>
836 <dd><p>Package:LISP
837 </p>
838 <p>Parses a string representation of a pathname into a pathname. HOST
839 is ignored.
840 </p>
841
842 </dd></dl>
843
•844 <dl class="def">
845 <dt id="index-PATHNAME_002dDIRECTORY"><span class="category">Function: </span><span><strong>PATHNAME-DIRECTORY</strong> <em>(pathname)</em><a href='#index-PATHNAME_002dDIRECTORY' class='copiable-anchor'> &para;</a></span></dt>
846 <dd><p>Package:LISP
847 </p>
848 <p>Returns the directory slot of PATHNAME.
849 </p>
850
851 </dd></dl>
852
•853 <dl class="def">
854 <dt id="index-GET_002dMACRO_002dCHARACTER"><span class="category">Function: </span><span><strong>GET-MACRO-CHARACTER</strong> <em>(char &amp;optional (readtable *readtable*))</em><a href='#index-GET_002dMACRO_002dCHARACTER' class='copiable-anchor'> &para;</a></span></dt>
855 <dd><p>Package:LISP
856 </p>
857 <p>Returns the function associated with CHAR and, as a second value, returns
858 the non-terminating-p flag.
859 </p>
860
861 </dd></dl>
862
•863 <dl class="def">
864 <dt id="index-FORMAT"><span class="category">Function: </span><span><strong>FORMAT</strong> <em>(destination control-string &amp;rest arguments)</em><a href='#index-FORMAT' class='copiable-anchor'> &para;</a></span></dt>
865 <dd><p>Package:LISP
866 </p>
867 <p>Provides various facilities for formatting output.
868 DESTINATION controls where the result will go. If DESTINATION is T, then
869 the output is sent to the standard output stream. If it is NIL, then the
870 output is returned in a string as the value of the call. Otherwise,
871 DESTINATION must be a stream to which the output will be sent.
872 </p>
873 <p>CONTROL-STRING is a string to be output, possibly with embedded
874 formatting directives, which are flagged with the escape character
875 &quot;~&quot;. Directives generally expand into additional text to be output,
876 usually consuming one or more of ARGUMENTs in the process.
877 </p>
878
879
880 <p>A few useful directives are:
881 </p><div class="example">
882 <pre class="example">
883
884 ~A, ~nA, ~n@A Prints one argument as if by PRINC
885 ~S, ~nS, ~n@S Prints one argument as if by PRIN1
886 ~D, ~B, ~O, ~X Prints one integer in decimal, binary, octal, and hexa
887 ~% Does TERPRI
888 ~&amp; Does FRESH-LINE
889 </pre></div>
890
891 <p>where n is the minimal width of the field in which the object is printed.
892 ~nA and ~nS put padding spaces on the right; ~n@A and ~n@S put on the left.
893 </p>
894 <div class="example">
895 <pre class="example">~R is for printing numbers in various formats.
896
897 ~nR prints arg in radix n.
898 ~R prints arg as a cardinal english number: two
899 ~:R prints arg as an ordinal english number: third
900 ~@R prints arg as an a Roman Numeral: VII
901 ~:@R prints arg as an old Roman Numeral: IIII
902
903 ~C prints a character.
904 ~:C represents non printing characters by their pretty names,eg Space
905 ~@C uses the #\ syntax to allow the reader to read it.
906
907 ~F prints a floating point number arg.
908 The full form is ~w,d,k,overflowchar,padcharF
909 w represents the total width of the printed representation (variable if
910 not present)
911 d the number of fractional digits to display
912 (format nil &quot;~,2f&quot; 10010.0314) --&gt; &quot;10010.03&quot;
913 k arg is multiplied by 10^k before printing it as a decimal number.
914 overflowchar width w characters copies of the overflow character will
915 be printed. eg(format t &quot;X&gt;~5,2,,'?F&lt;X&quot; 100.034) --&gt; X&gt;?????&lt;X
916 padchar is the character to pad with
917 (format t &quot;X&gt;~10,2,1,'?,'bF&lt;X&quot; 100.03417) --&gt;X&gt;bbb1000.34&lt;X
918 @ makes + sign print if the arg is positive
919
920 ~@[print-if-true~]
921 </pre></div>
922 <p>if arg is not nil, then it is retained as an arg for further printing,
923 otherwise it is used up
924 </p>
925 <div class="example">
926 <pre class="example"> (format nil &quot;~@[x = ~d~]~a&quot; nil 'bil) --&gt; &quot;BIL&quot;
927 (format nil &quot;~@[x = ~d ~]~a&quot; 8) --&gt; &quot;x = 8 BIL&quot;
928 </pre></div>
929
930
931 </dd></dl>
932
•933 <dl class="def">
934 <dt id="index-PATHNAME_002dNAME"><span class="category">Function: </span><span><strong>PATHNAME-NAME</strong> <em>(pathname)</em><a href='#index-PATHNAME_002dNAME' class='copiable-anchor'> &para;</a></span></dt>
935 <dd><p>Package:LISP
936 </p>
937 <p>Returns the name slot of PATHNAME.
938 </p>
939
940 </dd></dl>
941
•942 <dl class="def">
943 <dt id="index-MAKE_002dSTRING_002dOUTPUT_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-STRING-OUTPUT-STREAM</strong> <em>()</em><a href='#index-MAKE_002dSTRING_002dOUTPUT_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
944 <dd><p>Package:LISP
945 </p>
946 <p>Returns an output stream which will accumulate all output given it for
947 the benefit of the function GET-OUTPUT-STREAM-STRING.
948 </p>
949
950 </dd></dl>
951
•952 <dl class="def">
953 <dt id="index-MAKE_002dSYNONYM_002dSTREAM"><span class="category">Function: </span><span><strong>MAKE-SYNONYM-STREAM</strong> <em>(symbol)</em><a href='#index-MAKE_002dSYNONYM_002dSTREAM' class='copiable-anchor'> &para;</a></span></dt>
954 <dd><p>Package:LISP
955 </p>
956 <p>Returns a stream which performs its operations on the stream which is the
957 value of the dynamic variable named by SYMBOL.
958 </p>
959
960 </dd></dl>
961
•962 <dl class="def">
963 <dt id="index-_002aLOAD_002dVERBOSE_002a"><span class="category">Variable: </span><span><strong>*LOAD-VERBOSE*</strong><a href='#index-_002aLOAD_002dVERBOSE_002a' class='copiable-anchor'> &para;</a></span></dt>
964 <dd><p>Package:LISP
965 The default for the VERBOSE argument to LOAD.
966 </p>
967
968 </dd></dl>
969
•970 <dl class="def">
971 <dt id="index-_002aPRINT_002dCIRCLE_002a"><span class="category">Variable: </span><span><strong>*PRINT-CIRCLE*</strong><a href='#index-_002aPRINT_002dCIRCLE_002a' class='copiable-anchor'> &para;</a></span></dt>
972 <dd><p>Package:LISP
973 Whether the GCL printer should take care of circular lists.
974 </p>
975
976 </dd></dl>
977
•978 <dl class="def">
979 <dt id="index-_002aPRINT_002dPRETTY_002a"><span class="category">Variable: </span><span><strong>*PRINT-PRETTY*</strong><a href='#index-_002aPRINT_002dPRETTY_002a' class='copiable-anchor'> &para;</a></span></dt>
980 <dd><p>Package:LISP
981 Whether the GCL printer should pretty-print. See the function doc of PPRINT
982 for more information about pretty-printing.
983 </p>
984
985 </dd></dl>
986
•987 <dl class="def">
988 <dt id="index-FILE_002dWRITE_002dDATE"><span class="category">Function: </span><span><strong>FILE-WRITE-DATE</strong> <em>(file)</em><a href='#index-FILE_002dWRITE_002dDATE' class='copiable-anchor'> &para;</a></span></dt>
989 <dd><p>Package:LISP
990 </p>
991 <p>Returns the time at which the specified file is written, as an integer in
992 universal time format. FILE may be a string or a stream.
993 </p>
994
995 </dd></dl>
996
•997 <dl class="def">
998 <dt id="index-PRIN1_002dTO_002dSTRING"><span class="category">Function: </span><span><strong>PRIN1-TO-STRING</strong> <em>(object)</em><a href='#index-PRIN1_002dTO_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
999 <dd><p>Package:LISP
1000 </p>
1001 <p>Returns as a string the printed representation of OBJECT in the mostly
1002 readable representation.
1003 Equivalent to (WRITE-TO-STRING OBJECT :ESCAPE T).
1004 </p>
1005
1006 </dd></dl>
1007
•1008 <dl class="def">
1009 <dt id="index-MERGE_002dPATHNAMES"><span class="category">Function: </span><span><strong>MERGE-PATHNAMES</strong> <em>(pathname &amp;optional (defaults *default-pathname-defaults*) default-version)</em><a href='#index-MERGE_002dPATHNAMES' class='copiable-anchor'> &para;</a></span></dt>
1010 <dd><p>Package:LISP
1011 </p>
1012 <p>Fills in unspecified slots of PATHNAME from DEFAULTS. DEFAULT-VERSION
1013 is ignored in GCL.
1014 </p>
1015
1016 </dd></dl>
1017
•1018 <dl class="def">
1019 <dt id="index-READ_002dBYTE"><span class="category">Function: </span><span><strong>READ-BYTE</strong> <em>(stream &amp;optional (eof-error-p t) (eof-value nil))</em><a href='#index-READ_002dBYTE' class='copiable-anchor'> &para;</a></span></dt>
1020 <dd><p>Package:LISP
1021 </p>
1022 <p>Reads the next byte from STREAM.
1023 </p>
1024
1025 </dd></dl>
1026
•1027 <dl class="def">
1028 <dt id="index-PRINC_002dTO_002dSTRING"><span class="category">Function: </span><span><strong>PRINC-TO-STRING</strong> <em>(object)</em><a href='#index-PRINC_002dTO_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
1029 <dd><p>Package:LISP
1030 </p>
1031 <p>Returns as a string the printed representation of OBJECT without escape
1032 characters. Equivalent to
1033 (WRITE-TO-STRING OBJECT :ESCAPE NIL).
1034 </p>
1035
1036 </dd></dl>
1037
•1038 <dl class="def">
1039 <dt id="index-_002aSTANDARD_002dINPUT_002a"><span class="category">Variable: </span><span><strong>*STANDARD-INPUT*</strong><a href='#index-_002aSTANDARD_002dINPUT_002a' class='copiable-anchor'> &para;</a></span></dt>
1040 <dd><p>Package:LISP
1041 The default input stream used by the GCL reader.
1042 </p>
1043
1044 </dd></dl>
1045
•1046 <dl class="def">
1047 <dt id="index-PROBE_002dFILE"><span class="category">Function: </span><span><strong>PROBE-FILE</strong> <em>(file)</em><a href='#index-PROBE_002dFILE' class='copiable-anchor'> &para;</a></span></dt>
1048 <dd><p>Package:LISP
1049 </p>
1050 <p>Returns the truename of file if the file exists.
1051 Returns NIL otherwise.
1052 </p>
1053
1054 </dd></dl>
1055
•1056 <dl class="def">
1057 <dt id="index-PATHNAME_002dVERSION"><span class="category">Function: </span><span><strong>PATHNAME-VERSION</strong> <em>(pathname)</em><a href='#index-PATHNAME_002dVERSION' class='copiable-anchor'> &para;</a></span></dt>
1058 <dd><p>Package:LISP
1059 </p>
1060 <p>Returns the version slot of PATHNAME.
1061 </p>
1062
1063 </dd></dl>
1064
•1065 <dl class="def">
1066 <dt id="index-WRITE_002dLINE"><span class="category">Function: </span><span><strong>WRITE-LINE</strong> <em>(string &amp;optional (stream *standard-output*) &amp;key (start 0) (end (length string)))</em><a href='#index-WRITE_002dLINE' class='copiable-anchor'> &para;</a></span></dt>
1067 <dd><p>Package:LISP
1068 </p>
1069 <p>Outputs STRING and then outputs a newline character. Returns STRING.
1070 </p>
1071
1072 </dd></dl>
1073
•1074 <dl class="def">
1075 <dt id="index-WRITE"><span class="category">Function: </span><span><strong>WRITE</strong> <em>(object &amp;key (stream *standard-output*) (escape *print-escape*) (radix *print-radix*) (base *print-base*) (circle *print-circle*) (pretty *print-pretty*) (level *print-level*) (length *print-length*) (case *print-case*) (array *print-array*) (gensym *print-gensym*))</em><a href='#index-WRITE' class='copiable-anchor'> &para;</a></span></dt>
1076 <dd><p>Package:LISP
1077 </p>
1078 <p>Prints OBJECT in the specified mode. See the variable docs of *PRINT-...*
1079 for the mode.
1080 </p>
1081
1082 </dd></dl>
1083
•1084 <dl class="def">
1085 <dt id="index-GET_002dOUTPUT_002dSTREAM_002dSTRING"><span class="category">Function: </span><span><strong>GET-OUTPUT-STREAM-STRING</strong> <em>(stream)</em><a href='#index-GET_002dOUTPUT_002dSTREAM_002dSTRING' class='copiable-anchor'> &para;</a></span></dt>
1086 <dd><p>Package:LISP
1087 </p>
1088 <p>Returns a string of all the characters sent to STREAM made by
1089 MAKE-STRING-OUTPUT-STREAM since the last call to this function.
1090 </p>
1091
1092 </dd></dl>
1093
•1094 <dl class="def">
1095 <dt id="index-READ_002dDELIMITED_002dLIST"><span class="category">Function: </span><span><strong>READ-DELIMITED-LIST</strong> <em>(char &amp;optional (stream *standard-input*) (recursive-p nil))</em><a href='#index-READ_002dDELIMITED_002dLIST' class='copiable-anchor'> &para;</a></span></dt>
1096 <dd><p>Package:LISP
1097 </p>
1098 <p>Reads objects from STREAM until the next character after an object&rsquo;s
1099 representation is CHAR. Returns a list of the objects read.
1100 </p>
1101
1102 </dd></dl>
1103
•1104 <dl class="def">
1105 <dt id="index-READLINE_002dON"><span class="category">Function: </span><span><strong>READLINE-ON</strong> <em>()</em><a href='#index-READLINE_002dON' class='copiable-anchor'> &para;</a></span></dt>
1106 <dd><p>Package:SI
1107 </p>
1108 <p>Begins readline command editing mode when possible. In addition to
1109 the basic readline editing features, command word completion is
1110 implemented according to the following scheme:
1111 </p>
1112 <p>[[pkg]:[:]]txt
1113 </p>
1114 <p>pkg &ndash; an optional package specifier. Defaults to the current
1115 package. The symbols in this package and those in the packages in
1116 this package&rsquo;s use list will be searched.
1117 </p>
1118 <p>:[:] &ndash; an optional internal/external specifier. Defaults to
1119 external. The keyword package is denoted by a single colon at the
1120 beginning of the token. Only symbols of this type will be searched
1121 for completion.
1122 </p>
1123 <p>txt &ndash; a string. Symbol names beginning with this string are
1124 completed. The comparison is case insensitive.
1125 </p>
1126
1127 </dd></dl>
1128
•1129 <dl class="def">
1130 <dt id="index-READLINE_002dOFF"><span class="category">Function: </span><span><strong>READLINE-OFF</strong> <em>()</em><a href='#index-READLINE_002dOFF' class='copiable-anchor'> &para;</a></span></dt>
1131 <dd><p>Package:SI
1132 </p>
1133 <p>Disables readline command editing mode.
1134 </p>
1135 </dd></dl>
1136
•1137 <dl class="def">
1138 <dt id="index-_002aREADLINE_002dPREFIX_002a"><span class="category">Variable: </span><span><strong>*READLINE-PREFIX*</strong><a href='#index-_002aREADLINE_002dPREFIX_002a' class='copiable-anchor'> &para;</a></span></dt>
1139 <dd><p>Package:SI
1140 </p>
1141 <p>A string implicitly prepended to input text for use in readline
1142 command completion. If this string contains one or more colons, it is
1143 used to specify the default package and internal/external setting for
1144 searched symbols in the case that the supplied text itself contains no
1145 explicit package specification. If this string contains characters
1146 after the colon(s), or contains no colons at all, it is treated as a
1147 symbol name prefix. In this case, the prefix is matched first, then
1148 the supplied text, and the completion returned is relative to the
1149 supplied text itself, i.e. contains no prefix. For example, the
1150 setting &ldquo;maxima::$&rdquo; will complete input text &ldquo;int&rdquo; according to
1151 the internal symbols in the maxima package of the form
1152 &ldquo;maxima::$int...&rdquo;, and return suggestions to the user of the form
1153 &ldquo;int...&rdquo;.
1154 </p>
1155 </dd></dl>
1156
1157
•1158 </div>
1159 <hr>
1160 <div class="header">
1161 <p>
•1162 Next: <a href="Special-Forms-and-Functions.html">Special Forms and Functions</a>, Previous: <a href="Lists.html">Lists</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-and-Variable-Index.html" title="Index" rel="index">Index</a>]</p>
1163 </div>
1164
1165
1166
1167 </body>
1168 </html>