Scheme is an interpreted, or interactive, language, meaning that expressions are entered into the interpreter one at a time, at which time the interpreter immediately evaluates them and outputs the result. The XScheme interpreter is invoked from the command prompt by typing xscheme, like so (this assumes that you have already unpacked and installed the XScheme interpreter; if not, Appendix A provides instructions on how to do so):
% xscheme XScheme - Version 0.22 >The `>' symbol is the prompt, which is the interpreter's way of saying, `give me an expression to evaluate.'
The following system-level constructs are provided for manipulation of the interpreter and the programming environment (Section 11 describes the development process and debugging tips in detail):
(exit )
Exit the compiler and return to the operating system shell.
(load "filename")
Load the text in the file specified by filename, just as though it was
entered from the keyboard. The customary way to write Scheme programs is to
enter the function definitions in a text file using a text editor such as
vi or emacs, and then to load that text file in this fashion. Scheme
files generally are given the extension `.scm'.
(reset )
The XScheme interpreter, upon encountering an error condition, enters an
error-level state. The reset command returns the interpreter to the
top level, where one may continue programming as usual.
(transcript-on "filename")
Turns on the transcripting feature, in which all
text entered from the keyboard, and all text output from the interpreter, is
echoed to filename. This is useful for recording sample runs and the
like. Typing (transcript-off ) turns off the transcripting and closes
filename.