INPUT/OUTPUT FUNCTIONS


Note that when printing objects, printing is accomplished by sending the message :prin1 to the object.


READ AN EXPRESSION

(read [<stream> [<eofp> [<eof> [<rflag>]]]])

NOTE: there has been an incompatible change in arguments from prior versions.


MODIFY READ TABLE

(
set-macro-character <ch> <fcn> [ T ])

defined in init.lsp


EXAMINE READ TABLE

(get-macro-character <ch>)

defined in init.lsp


PRINT AN EXPRESSION ON A NEW LINE

(print <expr> [<stream>])

The expression is printed using prin1, then current line is terminated (Note: this is backwards from Common Lisp).


PRINT AN EXPRESSION

(prin1 <expr> [<stream>])

symbols, cons cells (without circularities), arrays, strings, numbers, and characters are printed in a format generally acceptable to the read function. Printing format can be affected by the global formatting variables: *print-level* and *print-length* for lists and arrays, *integer-format* for fixnums, *float-format* for flonums, *ratio-format* for ratios, and *print-case* and *readtable-case* for symbols.


PRINT AN EXPRESSION WITHOUT QUOTING

(
princ <expr> [<stream>])

Like PRIN1 except symbols (including uninterned), strings, and characters are printed without using any quoting mechanisms.


PRETTY PRINT AN EXPRESSION

(pprint <expr> [<stream>])

Uses prin1 for printing.


TERMINATE THE CURRENT PRINT LINE

(terpri [<stream>])


START A NEW LINE

(
fresh-line [<stream>])


LENGTH OF PRINTED REPRESENTATION USING PRIN1

(flatsize <expr>)


LENGTH OF PRINTED REPRESENTATION USING PRINC

(flatc <expr>)


ASK A YES OR NO QUESTION

(
y-or-n-p [<fmt> [<arg>...]])

(yes-or-no-p [<fmt> [<arg>...]])

defined in common.lsp. Uses *terminal-io* stream for interaction. y-or-n-p strives for a single character answer, using get-key if defined.


XLISP-PLUS - Version 2.1g - Tom Almy tom.almy@tek.com - 18 JUL 94
Generated with WebMaker