Next: , Previous: , Up: Operational Features   [Contents][Index]

3.12 Internal State

Variable: *interactive*

The variable *interactive* determines whether the SCM session is interactive, or should quit after the command line is processed. *interactive* is controlled directly by the command-line options ‘-b’, ‘-i’, and ‘-s’ (see Invoking SCM). If none of these options are specified, the rules to determine interactivity are more complicated; see Init5f4.scm for details.

Function: abort

Resumes the top level Read-Eval-Print loop.

Function: restart

Restarts the SCM program with the same arguments as it was originally invoked. All ‘-l’ loaded files are loaded again; If those files have changed, those changes will be reflected in the new session.

Note When running a saved executable (see Dump), restart is redefined to be exec-self.

Function: exec-self

Exits and immediately re-invokes the same executable with the same arguments. If the executable file has been changed or replaced since the beginning of the current session, the new executable will be invoked. This differentiates exec-self from restart.

Function: verbose n

Controls how much monitoring information is printed. If n is:


no prompt or information is printed.

>= 1

a prompt is printed.

>= 2

messages bracketing file loading are printed.

>= 3

the CPU time is printed after each top level form evaluated; notifications of heap growth printed; the interpreter checks stack depth periodically.

>= 4

a garbage collection summary is printed after each top level form evaluated;

>= 5

a message for each GC (see Garbage Collection) is printed; warnings issued for top-level symbols redefined.

Function: gc

Scans all of SCM objects and reclaims for further use those that are no longer accessible.

Function: gc #t

Garbage-collects only the ecache.

Function: room
Function: room #t

Prints out statistics about SCM’s current use of storage. (room #t) also gives the hexadecimal heap segment and stack bounds.

Constant: *scm-version*

Contains the version string (e.g. 5f4) of SCM.

3.12.1 Executable path

In order to dump a saved executable or to dynamically-link using DLD, SCM must know where its executable file is. Sometimes SCM (see Executable Pathname) guesses incorrectly the location of the currently running executable. In that case, the correct path can be set by calling execpath with the pathname.

Function: execpath

Returns the path (string) which SCM uses to find the executable file whose invocation the currently running session is, or #f if the path is not set.

Function: execpath #f
Function: execpath newpath

Sets the path to #f or newpath, respectively. The old path is returned.

For other configuration constants and procedures See Configuration in SLIB.

Next: , Previous: , Up: Operational Features   [Contents][Index]