Next: , Previous: , Up: The Language   [Contents][Index]

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 in Hobbit). *load-pathname* is used to compute the value of program-vicinity in SLIB.

Function: eval obj

Alias for eval in SLIB.

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.