Next: , Previous: SCM Options, Up: Operational Features


3.3 Invocation Examples

% scm foo.scm
Loads and executes the contents of foo.scm and then enters interactive session.
% scm -f foo.scm arg1 arg2 arg3
Parameters arg1, arg2, and arg3 are stored in the global list *argv*; Loads and executes the contents of foo.scm and exits.
% scm -s foo.scm arg1 arg2
Sets *argv* to ("foo.scm" "arg1" "arg2") and enters interactive session.
% scm -e `(write (list-ref *argv* *optind*))' bar
Prints ‘"bar"’.
% scm -rpretty-print -r format -i
Loads pretty-print and format and enters interactive session.
% scm -r5
Loads dynamic-wind, values, and syntax-rules macros and enters interactive (with macros) session.
% scm -r5 -r4
Like above but rev4-optional-procedures are also loaded.