chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] (argv) for scripts vs compiled executables


From: felix
Subject: Re: [Chicken-users] (argv) for scripts vs compiled executables
Date: Sun, 11 Apr 2004 15:31:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Linh Dang wrote:

Hi I have a script that when compiled, the following code must be changed from

        (list-ref (argv) (- x 2))

to
        (list-ref (argv) x)


You should use (command-line-arguments), which will always return
the argumens passed to the script or executable (minus the program name).


Is there a clean way to handle/detect interpreted vs compiled runtime?


Hm. Not really - good idea. I'll add something...


cheers,
felix




reply via email to

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