(command-line-arguments) instead of argv, which also doesnt have the arg0
listed.
On Wed, 17 Oct 2007, Eugene Ossintsev wrote:
Hi,
What do you, guys, usually do to make (argv) portable between the scripted
and compiled versions of a CHICKEN Scheme program?
For some reason (argv) in scripts gives not only the script file name but
also the CHICKEN interpreter name with all its options, that is basically not
typical for script interpreters (Ruby, Python...) and is not very convenient
to call the same code as a script and a compiled file to process the
arguments passed to the program.
For example, in a script (argv) gives something like
(/usr/local/bin/csi -s ./test.scm)
whereas the compiled version gives just
(./test)
The script in questions looks like the following:
-------------------------------------------
#!/usr/local/bin/csi -s
(display (argv))
(newline)
-------------------------------------------
- Eugene
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users