Chapter 14. Command-Line Interface

Table of Contents
System Argument Processing
REPL Argument Processing

The RScheme executable program in a unix-like environment accepts several switches, options, and arguments.

When the system starts up, the first thing it does is load the system image. When RScheme is configured, a default location for the system image is defined, and that location is compiled into the executable image. In particular, the image is sought in $INSTALL_DIR/resource/system.img, where $INSTALL_DIR is the installation directory for RScheme.

After loading the system image, the internal start function is called which executes the initialization procedures and then calls the current main function with the command line arguments in a list.

System Argument Processing

The C initialization code and the built in (system) start funcion interpret some but not all command arguments. The command-line arguments understood by the C initialization code will be shared by all "executable" images.

The following flags are processed by the system initialization code:

Table 14-1. Command-line Interface Flags defined for the RScheme executable environment. See also the following table.

- -versionPrint out the version and exit.
-imageUse an alternate system image file.
-qSuppress output of greetings.
-qimageUse an alternate system image file and suppress.
-scriptSuppress output of greetings and set script mode.
-bcitraceTurn on tracing of bytecodes; the system must have been configured with the - -enable-debug flag to make use of this flag.
-abtTurn on apply backtrace tracing from the start. Useful in some cases when turning it on at runtime (using ,fg-abt) doesn't work.