PREV UP NEXT SCM

3.1: Invoking SCM

scm [-a kbytes] [-ibvqmu] [-p number]

[-c expression] [-e expression] [-f filename] [-l filename] [-r feature] [-- | - | -s] [filename] [arguments ...]

Upon startup scm loads the file specified by by the environment variable SCM_INIT_PATH.

If SCM_INIT_PATH is not defined or if the file it names is not present, scm tries to find the directory containing the executable file. If it is able to locate the executable, scm looks for the initialization file (usually `Init.scm') in platform-dependent directories relative to this directory. See File-System Habitat for a blow-by-blow description.

As a last resort (if initialization file cannot be located), the C compile parameter IMPLINIT (defined in the makefile or `scmfig.h') is tried.

Unless the option -no-init-file or --no-init-file occurs in the command line, `Init.scm' checks to see if there is file `ScmInit.scm' in the path specified by the environment variable HOME (or in the current directory if HOME is undefined). If it finds such a file it is loaded.

`Init.scm' then looks for command input from one of three sources: From an option on the command line, from a file named on the command line, or from standard input.

This explanation applies to SCMLIT or other builds of SCM.

Scheme-code files can also invoke SCM and its variants. See #!.