chickadee » eval » load

load FILE #!optional EVALPROCprocedure

Loads and evaluates expressions from the given source file, which may be either a string or an input port. Each expression read is passed to EVALPROC (which defaults to eval). On platforms that support it (currently BSD, Haiku, MacOS X, Linux, Solaris, and Windows), load can be used to load compiled programs:

% cat x.scm
(define (hello) (print "Hello!"))
% csc -s x.scm
% csi -q
#;1> (load "")
; loading ...
#;2> (hello)

The second argument to load is ignored when loading compiled code. If source code is loaded from a port, then that port is closed after all expressions have been read.

A compiled file can only be loaded once. Subsequent attempts to load the same file have no effect.