The command-line procedure doesn't distinguish between what we
might call "application arguments" (arguments meant for the
application) and "invocation arguments" (the command and argument
for starting up Scheme with a given "application").
One might load this file using load, run it from the command line,
or compile it and then execute it. I think one would want the application
arguments to be the same regardless. The choice I made for Kawa
was that the application arguments are (cdr (command-line))
while the invocation arguments are pasted to a single string as
the (car (command-line)). I think this is allowed by R6RS/R7RS,
and I think this is a reasonable approach.
Examples:
$ java kawa.repl ~/tmp/foo.scm abc "def ghi"
c-l: ("java kawa.repl /home/bothner/tmp/foo.scm" "abc" "def ghi")
Compiling to an application (with a static "main" method):
$ kawa --main -C ~/tmp/foo.scm
(compiling /home/bothner/tmp/foo.scm to foo)
$ java foo abc "def ghi"
c-l: ("java foo" "abc" "def ghi")
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports