@end ifnottex
@menu
-* Introduction::
-* Installation::
-* Running Scheme::
-* Using Scheme::
-* Compiling Programs::
-* Debugging::
-* Profiling::
-* GNU Emacs Interface::
-* Edwin::
-* Release Notes::
-* GNU Free Documentation License::
-* Environment-variable Index::
-* Option Index::
-* Variable Index::
-* Concept Index::
+* Introduction::
+* Installation::
+* Running Scheme::
+* Using Scheme::
+* Compiling Programs::
+* Debugging::
+* Profiling::
+* GNU Emacs Interface::
+* Edwin::
+* Release Notes::
+* GNU Free Documentation License::
+* Environment-variable Index::
+* Option Index::
+* Variable Index::
+* Concept Index::
@end menu
@node Introduction, Installation, Top, Top
using.
@menu
-* Unix Installation::
-* Windows Installation::
+* Unix Installation::
+* Windows Installation::
* Portable C Installation::
@end menu
using command-line options and environment variables.
@menu
-* Basics of Starting Scheme::
-* Customizing Scheme::
-* Memory Usage::
-* Command-Line Options::
-* Custom Command-line Options::
-* Environment Variables::
-* Starting Scheme from Microsoft Windows::
-* Leaving Scheme::
+* Basics of Starting Scheme::
+* Customizing Scheme::
+* Memory Usage::
+* Command-Line Options::
+* Custom Command-line Options::
+* Environment Variables::
+* Starting Scheme from Microsoft Windows::
+* Leaving Scheme::
@end menu
@node Basics of Starting Scheme, Customizing Scheme, Running Scheme, Running Scheme
@end example
@menu
-* Microcode Environment Variables::
-* Runtime Environment Variables::
-* Edwin Environment Variables::
-* Windows Environment Variables::
+* Microcode Environment Variables::
+* Runtime Environment Variables::
+* Edwin Environment Variables::
+* Windows Environment Variables::
@end menu
@node Microcode Environment Variables, Runtime Environment Variables, Environment Variables, Environment Variables
@option{--constant}. The default value is computed to be the correct
size for the band being loaded.
-@item MITSCHEME_HEAP
-@nvindex MITSCHEME_HEAP
+@item MITSCHEME_HEAP_SIZE
+@nvindex MITSCHEME_HEAP_SIZE
The size of the heap, in 1024-word blocks; overridden by
@option{--heap}. The default value depends on the architecture: for
32-bit machines the default is @samp{4096}, and for 64-bit machines
the default is @samp{16384}.
-@item MITSCHEME_STACK
-@nvindex MITSCHEME_STACK
+@item MITSCHEME_STACK_SIZE
+@nvindex MITSCHEME_STACK_SIZE
The size of the stack, in 1024-word blocks; overridden by
@option{--stack}. The default value is @samp{128}.
@end table
describe how to use the compiler, and how to debug your programs.
@menu
-* REPL::
-* Loading Files::
-* World Images::
-* Garbage Collection::
+* REPL::
+* Loading Files::
+* World Images::
+* Garbage Collection::
@end menu
@node REPL, Loading Files, Using Scheme, Using Scheme
prints the result, and gives you another prompt.
@menu
-* The Prompt and Level Number::
-* Interrupting::
-* Restarting::
-* The Current REPL Environment::
+* The Prompt and Level Number::
+* Interrupting::
+* Restarting::
+* The Current REPL Environment::
@end menu
@node The Prompt and Level Number, Interrupting, REPL, REPL
; (RESTART 2) => Define foo to a given value.
; (RESTART 1) => Return to read-eval-print level 1.
-2 error>
+2 error>
@end group
@end example
; (RESTART 2) => Define foo to a given value.
; (RESTART 1) => Return to read-eval-print level 1.
-2 error>
+2 error>
@end group
@end example
the @option{--compiler} command-line option is specified.
@menu
-* Compilation Procedures::
-* Declarations::
-* Efficiency Tips::
+* Compilation Procedures::
+* Declarations::
+* Efficiency Tips::
@end menu
@node Compilation Procedures, Declarations, Compiling Programs, Compiling Programs
@code{sf} make them more efficient.
@menu
-* Standard Names::
-* In-line Coding::
-* Replacement of Operators::
-* Reduction of Operators::
+* Standard Names::
+* In-line Coding::
+* Replacement of Operators::
+* Reduction of Operators::
@end menu
@node Standard Names, In-line Coding, Declarations, Declarations
explanations useful.
@menu
-* Coding style::
-* Global variables::
+* Coding style::
+* Global variables::
* Type and range checking::
-* Fixnum arithmetic::
-* Flonum arithmetic::
+* Fixnum arithmetic::
+* Flonum arithmetic::
@end menu
@node Coding style, Global variables, Efficiency Tips, Efficiency Tips
(define (f2)
(define v (compute-100))
- (lambda () v))
+ (lambda () v))
@end group
@end example
@c true block scoping, thus the declaration takes effect only within the
@c procedure or @code{let} in which the declaration occurs. This makes
@c it possible to control individual variable references, for example:
-@c
+@c
@c @example
@c @group
@c (let ()
@c x)
@c @end group
@c @end example
-@c
+@c
@c In earlier versions, a declaration affects all uses of the variable.
-@c
+@c
@c In all versions, top level declarations affect the whole source file.
@node Type and range checking, Fixnum arithmetic, Global variables, Efficiency Tips
or calls to procedures then the values tend to get boxed anyway.
@c
@c @subsubheading A safer alternative
-@c
+@c
@c An alternative to putting in @code{flo:} operations yourself is to let
@c the compiler try.
@c In the next definition of @code{distance}, the programmer explicitly
@c tests for flonum arguments and duplicates the expression.
-@c
+@c
@c The compiler compiles the expressions differently: for the first
@c expression it knows from the conditional that @var{x} and @var{y} are
@c flonums and will replace both @code{*} and the @code{+} operators with
@c flonum operators.
@c It doesn't replace the @code{sqrt} operator, though, as it doesn't know
@c that sums of squares of reals are non-negative.
-@c
+@c
@c This approach has the advantage of being completely safe, and
@c @code{distance} will still work for other kinds of number.
-@c
+@c
@c @example
@c @group
@c (define (distance x y)
@c (sqrt (+ (* x x) (* y y)))))
@c @end group
@c @end example
-@c
+@c
@c This approach is effective only for MIT/GNU Scheme version 8.0
@c and later. Earlier versions do not do this kind of type analysis.
; (RESTART 2) => Define foo to a given value.
; (RESTART 1) => Return to read-eval-print level 1.
-2 error>
+2 error>
@end group
@end example
appear, be prepared to attack them with all the tools available.
@menu
-* Subproblems and Reductions::
-* Command-Line Debugger::
-* Debugging Aids::
-* Advising Procedures::
+* Subproblems and Reductions::
+* Command-Line Debugger::
+* Debugging Aids::
+* Advising Procedures::
@end menu
@node Subproblems and Reductions, Command-Line Debugger, Debugging, Debugging
the error; the debugger provides you with the means to inspect this
information. For this reason, the debugger is sometimes called a
@dfn{continuation browser}.
-
+
Here is the transcript of a typical Scheme session, showing a user
evaluating the expression @samp{(fib 10)}, Scheme responding with an
unbound variable error for the variable @code{fob}, and the user
The execution history for this subproblem contains 1 reduction.
You are now in the debugger. Type q to quit, ? for commands.
-3 debug>
+3 debug>
@end group
@end example
in Emacs Lisp. This manual does not discuss customization of Edwin.
@menu
-* Starting Edwin::
-* Leaving Edwin::
-* Edwin Scheme Mode::
-* Edwin Scheme Evaluation::
-* Edwin REPL Mode::
-* Edwin Debugger::
-* Last Resorts::
+* Starting Edwin::
+* Leaving Edwin::
+* Edwin Scheme Mode::
+* Edwin Scheme Evaluation::
+* Edwin REPL Mode::
+* Edwin Debugger::
+* Last Resorts::
@end menu
@node Starting Edwin, Leaving Edwin, Edwin, Edwin