Go to the first, previous, next, last section, table of contents.


Creating Modules

syntax: module <body>
procedure: make-module expression
procedure: load-module filename

(1)

<Body> should be a sequence of one or more definitions and expressions. Module sequentially evaluates the expressions and definitions of <body> in a scheme report environment. Definitions occuring at the top level cause bindings to be created in the binding contour which the call to module creates and returns.

Make-module evaluates expression in a scheme report environment. Definitions occuring at the top level cause bindings to be created in the binding contour which the call to make-module creates and returns.

Filename should be a string naming an existing file containing Scheme source code. The load-module procedure reads expressions and definitions from the file and evaluates them sequentially in a scheme report environment. Definitions occuring at the top level cause bindings to be created in the binding contour which the call to load-module creates and returns.

The load-module procedure does not effect the values returned by current-input-port and current-output-port.

Rationale: For portability, load-module must operate on source files. Its operation on other kinds of files necessarily varies among implementations.


Go to the first, previous, next, last section, table of contents.