[plt-scheme] Passing parameters to scheme executable- help?
At Sat, 22 Jul 2006 18:06:18 EDT, PzYcHx at aol.com wrote:
> Anyway, I use the DrScheme IDE (v301) and sometimes make
> executables from it. Does anybody out there know how to pass parameters to
> these mzscheme executables on the command line? I noticed that the variable
> argv is automatically the empty vector #0(). How do I fill it?
I'm not sure I understand the question. Here's what I tried (using v301):
1. Change DrScheme to the "MzScheme" language.
2. Put
(printf "~s\n" argv)
in the definitions window.
3. Save as "example.scm".
4. Select "Create Executable" and saved as "example.exe".
5. Start a "Command Prompt" and cd to the directory where
"example.exe" was saved.
6. Run
example.exe 1 2 3
and see
#3("a" "b" "c")
as output.
Matthew