The information here has been tested with the version 6.0a of Petite Chez Scheme and (in the case of graphics) version 0.9u of SWL. Although no testing was done with non-Petite Chez Scheme, it should work equally well in version 6.0; we will try to track new versions of Chez Scheme as they come out.
error
,
from chapter 6 onward, as well as in the other two libraries.
Another is the graphical images, introduced
in the application section of chapter 1 and also used in subsequent chapters.
The final one is the object-oriented programming system, used in chapter
14.
Each of these libraries can be downloaded from the web below.
Once you have one of the library files on your system, you can load it
into Chez Scheme using the load
procedure. For example,
you could evaluate (load "error.ss")
to load in the
error library. If the error.ss
file isn't in your
current directory (folder) you might need to specify a pathname, such
as (load "/usr/local/scheme-libraries/error.ss")
or
(load "c:\\scheme\\libraries\\error.ss")
.
error.ss
error
.
Not only is this used from chapter 6 onward, it is also used in the
other two libraries. Therefore, you must load this one if you load
either of the other two. Important note: Chez Scheme
comes with its own definition of error
, which
is not compatible with the textbook. Therefore, if you don't load
this library in, you will have more obscure symptoms than simply the
procedure not being defined. The library file re-defines it in such
a way as to be compatible with both the textbook's usage and the usage
shown in the Chez Scheme documentation.
fungraph.ss
oops.ss
For each name, except for time
(which is special syntax
in Chez Scheme),
the Chez Scheme definition remains available by prefixing the name with
#%
. For example, if in chapter 7 you have defined
length
to be your own procedure, you can still
use Chez Scheme's version using #%length
. Or, you can
return to the original definition of length
by using
(define length #%length)
We list below the affected names, organized into categories and listed within each category in their order of their appearance within the book:
length
list-ref
list-tail
map
reverse
gcd
merge
expand
sort
(newline)
newline
procedure to
break output into separate lines. Unfortunately, there are two
different conventions in use by different Scheme systems. One is to
always use newline
at the start of each line of output,
while the other is to always use it at the end of each line. As a
result of this lack of standardization, wherever we positioned the
uses of (newline)
in our programs would result in output
that looked odd on some systems. We've tried in the textbook to make
choices that don't look too horrible on any system, with the result
that the output tends to look sub-optimal on every system. In
particular, there tends to be extra blank lines. If you are working
consistently within Chez Scheme (or any other one system), feel free to
remove or reposition (newline)
as necessary to make the
output look best.
rcross-bb
, are
neither pre-defined nor defined within the library. Instead, their
definitions are in a separate file.
show
procedure.
Also, note that Chez Scheme's with-output-to-file
signals
an error if the file already exists.