| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Gauche can be used either as an independent Scheme interpreter
or as an embedded Scheme library. The interpreter
which comes with Gauche distribution is a program named gosh.
Gauche's interpreter. Without scheme-file, gosh works
interactively, i.e. it reads a Scheme expression from the standard input,
evaluates it, and prints the result, and repeat that until it reads EOF or
is terminated.
If gosh is invoked without scheme-file, but the input
is not a terminal, it enters read-eval-print loop but not writes
out a prompt while waiting input form. This is useful when you
pipe Scheme program into gosh. You can force this behavior
or suppress this behavior by -b and -i options.
If scheme-file is specified, gosh runs it as a
Scheme program and exit.
See section Writing Scheme scripts, for details.
The following command line options are recognized by gosh.
The first command line argument which doesn't begin with `-'
is recognized as the script file. If you want to specify a file
that begins with a minus sign, use a dummy option `--'.
Prepends path to the load path list. You can specify this option more than once to add multiple paths.
Appends path to the tail of the load path list. You can specify this option more than once to add multiple paths.
Makes gosh not to load the default initialization file.
Prints the gosh version and exits.
Use module. Before starting execution of scheme-file or entering
the read-eval-print loop, the specified module is used, i.e.
it is loaded and imported (See section Defining and selecting modules, for details of use).
You can specify this option more than once to use multiple modules.
Load file before starting execution of scheme-file or entering
the read-eval-print loop. The file is loaded in the same way as
load (See section Loading Scheme file).
You can specify this option more than once to load multiple files.
Evaluate scheme-expression before starting execution of scheme-file or entering the read-eval-print loop. Evaluation is done in the interaction-environment (See section Eval and repl). You can specify this option more than once to evaluate multiple expressions.
Same as -e, except the scheme-expression is read as if it is surrounded by parenthesis. For example:
% gosh -umath.const -E"print (sin (* pi/180 15))" -Eexit 0.25881904510252074 |
Batch. Does not print prompts even if the input is a terminal.
Interactive. Print prompts even if the input is not a terminal.
This option controls compiler and runtime behavior. For now we have following options available:
Prohibits the compiler from inlining procedures and constants. Equivalent to no-inline-globals, no-inline-locals and no-inline constants combined.
Prohibits the compiler from inlining global procedures.
Prohibits the compiler from inlining local procedures.
Prohibits the compiler from inlining constants.
Reports whenever a file is loaded.
Don't keep source information for debugging. Consumes less memory.
Ignore case for symbols as specified in R5RS. (It is distinguished by default). See section Case-sensitivity.
Adds "../src" and "../lib" to the load path before loading
initialization file. This is useful when you want to test the
compiled gosh interpreter inside source tree, without installing it.
Turn on the profiler. The following profiler-option is recognized:
timeRecords and reports time spent on function calls and number of times each function is called.
loadRecords and reports time spent on loading each modules. Useful to tune start-up time of the scripts. (Results are in elapsed time).
See Using profiler for the details of the profiler.
--
When gosh sees this option, it stops processing the options
and takes next command line argument as a script file. It is useful
in case if you have a script file that begins with a minus sign,
although it is not generally recommended.
The options -I, -A, -l, -u, -e and -E are processes in the order of appearance. For example, adding a load path by -I affects the -l and -u option after it but not before it.
The following environment variables are recognized:
You can specify additional load paths by this environment
variable, delimiting the paths by ':'.
The paths are appended before the system default load paths.
You can specify additional load paths for dynamically loaded
objects by this environment variable, delimiting the paths by ':'.
The paths are appended before the system default load paths.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.