
Next: Graphs
Up: Additional Facilities
Previous: Input Parsing
MzScheme's printer follows these non-standard rules:
- Boxes can be printed with the #& notation (see section
3.1). When box printing is off, all boxes are printed as
#<box>. Box printing
is controlled with print-box; this procedure takes zero
arguments to return the current mode, or one Boolean argument to set
the mode. Box printing is on by default.
- Structures can be printed as vectors. In the vector, the first
item is a symbol of the form struct:s -- where
s is the name of the structure -- and the remaining elements are
the elements of the structure. When structure printing is off,
structures are printed as #<struct:s>. Structure printing
is controlled with print-struct; this procedure takes zero
arguments to return the current mode, or one Boolean argument to set
the mode. Structure printing is off by default.
- Symbols containing spaces or special charaters are printed
using escaping backslashes and quoting vertical bars. Symbols are
quoted with vertical bars when they would otherwise print the same
as a numerical constant. See section 3.1.
- Characters with the special names described in section
3.1 write using the same name. (Some characters have
multiple names; the #
newline and #
nul names are used
instead of #
linefeed and #
null ). All other charaters
write as #
followed by the single-byte character value.
All characters display as the single-byte character value.
- S-expressions with shared stucture can be printed using
#n= and #n#. See section 3.3.
PLT