Next: , Previous: Inspector, Up: Command processor


2.4.10 Command programs

The Scheme48 command processor can be controlled programmatically by command programs, programs written in the exec language. This language is essentially a mirror of the commands but in a syntax using S-expressions. The language also includes all of Scheme. The exec language is defined as part of the exec package.

— command: ,exec
— command: ,exec command

Sets the interaction environment to be the exec package. If an argument is passed, it is set temporarily, only to run the given command.

Commands in the exec language are invoked as procedures in Scheme. Arguments should be passed as follows:

Command programs can be loaded by running the ,load command in the exec package. Scripts to load application bundles are usually written in the exec language and loaded into the exec package. For example, this command program, when loaded into the exec package, will load foo.scm into the config package, ensure that the package frobbotzim is loaded, and open the quuxim structure in the user package:

     (config '(load "foo.scm"))
     (load-package 'frobbotzim)
     (user '(open quuxim))