These procedures are provided by all implementations.
Loads a file of Scheme source code from name with the default filename extension used in SLIB. For instance if the filename extension used in SLIB is .scm then
(slib:load-source "foo")
will load from file foo.scm.
On implementations which support separtely loadable compiled modules, loads a file of compiled code from name with the implementation's filename extension for compiled code appended.
Loads a file of Scheme source or compiled code from name with the appropriate suffixes appended. If both source and compiled code are present with the appropriate names then the implementation will load just one. It is up to the implementation to choose which one will be loaded.
If an implementation does not support compiled code then
slib:load
will be identical toslib:load-source
.
eval
returns the value of obj evaluated in the current top level environment. Eval provides a more general evaluation facility.
filename should be a string. If filename names an existing file, the Scheme source code expressions and definitions are read from the file and eval called with them sequentially. The
slib:eval-load
procedure does not affect the values returned bycurrent-input-port
,current-error-port
, andcurrent-output-port
.
Outputs an error message containing the arguments, aborts evaluation of the current form and responds in a system dependent way to the error. Typical responses are to abort the program or to enter a read-eval-print loop.
Exits from the Scheme session returning status n to the system. If n is omitted or
#t
, a success status is returned to the system (if possible). If n is#f
a failure is returned to the system (if possible). If n is an integer, then n is returned to the system (if possible). If the Scheme session cannot exit, then an unspecified value is returned fromslib:exit
.
Web browsers have become so ubiquitous that programming languagues should support a uniform interface to them.
If a browser is running,
browse-url
causes the browser to display the page specified by string url and returns#t
.If the browser is not running,
browse-url
starts a browser displaying the argument url. If the browser starts as a background job,browse-url
returns#t
immediately; if the browser starts as a foreground job, thenbrowse-url
returns#t
when the browser exits; otherwise (if no browser) it returns#f
.