Next: , Previous: Files and Ports, Up: The Language

4.7 Eval and Load

— Function: try-load filename

If the string filename names an existing file, the try-load procedure reads Scheme source code expressions and definitions from the file and evaluates them sequentially and returns #t. If not, try-load returns #f. The try-load procedure does not affect the values returned by current-input-port and current-output-port.

— Variable: *load-pathname*

Is set to the pathname given as argument to load, try-load, and dyn:link (see Compiling And Linking). *load-pathname* is used to compute the value of program-vicinity.

— Function: eval obj

Alias for eval.

— Function: eval-string str

Returns the result of reading an expression from str and evaluating it. eval-string does not change *load-pathname* or line-number.

— Function: load-string str

Reads and evaluates all the expressions from str. As with load, the value returned is unspecified. load-string does not change *load-pathname* or line-number.

— Function: line-number

Returns the current line number of the file currently being loaded.