*read*

Variable

Package: top-level

The values of *read* (this variable), *eval*, and *print*, if valid functions (that is, ones acceptable to the function funcall), will be funcalled to read user input, evaluate the result from the read, and print the result of the evaluation. If the value of *read* (this variable) is not a funcallable object, the default function, read will be used in place of the non-funcallable object. The default value for all three variables is nil.

To be a value of one of these variables, a function must accept one argument (for *eval* and *read* (this variable)) or two arguments (for *print*). The value of *read* (this variable) will be passed the stream which is to be read. The value of *eval* will be passed a form to evaluate. The value of *print* will be passed a value to print and a stream. Great care should be taken before setting any of these variables, since binding these to something other than a proper function will result in a recursive error (since after an error, another read-eval-print loop is called). If you change the value of one of these variables, you may return to the default behavior by changing the value back to nil.

If you build an image with the include-tpl keyword argument to build-lisp-image nil, the image will have a minimal top level which will use *read* (this variable), *eval*, and *print*. The values must be valid functions in that case. See Minimal top levels in building-images.htm for information on minimal top levels.

See top-level.htm for more information on the top level.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.