Scheme 48 Manual | Contents | In Chapter: Command processor
Previous: Inspection mode | Next: Building images

## Command programs

The `exec` package contains procedures that are used to execute the command processor's commands. A command `,`foo`` is executed by applying the value of the identifier `foo` in the `exec` package to the (suitably parsed) command arguments.

  `,exec [`command`]`
  Evaluate `command` in the `exec` package. For example, use

  >     ,exec ,load filename

  to load a file containing commands. If no `command` is given, the `exec` package becomes the execution package for future commands.

The required argument types are as follows:

- filenames should be strings
- other names and identifiers should be symbols
- expressions should be s-expressions
- commands (as for `,config` and `,exec` itself) should be lists of the form `(`command-name` `argument` `...`)` where `command-name` is a symbol.

For example, the following two commands are equivalent:

>     ,config ,load my-file.scm

>     ,exec (config '(load "my-file.scm"))

The file `scheme/vm/load-vm.scm` in the source directory contains an example of an `exec` program.

Previous: Inspection mode | Next: Building images