[plt-scheme] mzscheme --script and console output
At Mon, 21 Jul 2008 14:03:39 -0500, "Grant Rettke" wrote:
> Question: being that all of the code is now in modules, the right way
> to run the program is this?
>
> mzscheme --require [some file with the module]
>
> When you run mzscheme like this, to what command line arguments is it
> equivelant?
>
> mzscheme [some file with the module]
>
> Because both of the previous command line options appear to do the same thing.
Normally, you want just
mzscheme <file>
which expands to
mzscheme --require-script <file>
The command
mzscheme --require <file>
turns out to be the same, but only because there are no extra
command-line arguments. If you write
mzscheme --require <file> -x
when `-x' is treated as a flag to `mzscheme', but with
mzscheme --require-script <file> -x
then `-x' is sent on as a flag to the program.
More generally, `--require' is meant to be used in combination with
other command-line flags to `mzscheme', such as `--repl' or multiple
`--require's. Use `--require' when you want to "script" the start-up
process with multiple steps, instead of just running a program.
Matthew