chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] (argv) in scripts and compiled files


From: Mario Domenech Goulart
Subject: Re: [Chicken-users] (argv) in scripts and compiled files
Date: 17 Oct 2007 23:09:02 -0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hi Eugene,

On Wed, 17 Oct 2007 22:03:20 -0400 Eugene Ossintsev <address@hidden> wrote:

> 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)
> -------------------------------------------

Maybe what you want is command-line-arguments
(http://chicken.wiki.br/Parameters#command-line-arguments).

Best wishes,
Mario




reply via email to

[Prev in Thread] Current Thread [Next in Thread]