From: ········@gmail.com
Subject: clisp - command line parameters
Date: 
Message-ID: <1108589836.715975.50730@g14g2000cwa.googlegroups.com>
Hi from a newbie.

I am using (dr) scheme as a student, which means i have some basic
knowledge of lisp. I recently switched to "clisp". I am using debian
gnu/linux and installed the clisp package.

How can I read the command line parameters?

I couldn't find information via google and here is the only group which
i can post on this subject. If it was irrelevant, thanks for spending
your time.

From: Sam Steingold
Subject: Re: clisp - command line parameters
Date: 
Message-ID: <ull9ot8mv.fsf@gnu.org>
> * ········@gmail.com <········@tznvy.pbz> [2005-02-16 13:37:16 -0800]:
>
> I am using (dr) scheme as a student, which means i have some basic
> knowledge of lisp. I recently switched to "clisp". I am using debian
> gnu/linux and installed the clisp package.
>
> How can I read the command line parameters?

what do you do if you need to find out "command line parameters" for
grep or ls?  you do "man grep" and "man ls".
same here - "man clisp" is your friend.
if that does not show the CLISP manual page,
you installation is severely broken.

$ clisp --help
will also show a command line summary,
as well as the url <http://clisp.cons.org>
which will immediately point you to
2 pages:

1. "CLISP manual page for UN*X"
   <http://clisp.cons.org/clisp.html>

2. CLISP Debian package page
   <http://packages.debian.org/unstable/interpreters/clisp.html>
   which will tell you right away that the man page is at
   /usr/share/man/man1/clisp.1.gz

> I couldn't find information via google and here is the only group
> which i can post on this subject.

Searching for "clisp options" returns the CLISP man page
<http://clisp.cons.org/clisp.html> as the first hit ("feeling lucky")

Also, you might want to check out the CLISP FAQ list
<http://clisp.cons.org/faq.html> linked from the main page.
This _will_ save _you_ a lot of time.
In fact, your question _is_ answered there at
<http://clisp.cons.org/faq.html#opt>!

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
If your VCR is still blinking 12:00, you don't want Linux.
From: Emre Sevinc
Subject: Re: clisp - command line parameters
Date: 
Message-ID: <87fyzw9i2w.fsf@ileriseviye.org>
Sam Steingold <···@gnu.org> writes:

>> * ········@gmail.com <········@tznvy.pbz> [2005-02-16 13:37:16 -0800]:
>>
>> I am using (dr) scheme as a student, which means i have some basic
>> knowledge of lisp. I recently switched to "clisp". I am using debian
>> gnu/linux and installed the clisp package.
>>
>> How can I read the command line parameters?
>
> what do you do if you need to find out "command line parameters" for
> grep or ls?  you do "man grep" and "man ls".
> same here - "man clisp" is your friend.
> if that does not show the CLISP manual page,
> you installation is severely broken.

I think Can Burak wanted to learn how a program in clisp
can read the command line arguments passed to itself. Not
the command line options of starting the clisp.


>> I couldn't find information via google and here is the only group
>> which i can post on this subject.
>
> Searching for "clisp options" returns the CLISP man page
> <http://clisp.cons.org/clisp.html> as the first hit ("feeling lucky")
>
> Also, you might want to check out the CLISP FAQ list
> <http://clisp.cons.org/faq.html> linked from the main page.
> This _will_ save _you_ a lot of time.
> In fact, your question _is_ answered there at
> <http://clisp.cons.org/faq.html#opt>!

The address above talks about clisp command line arguments
not the method of reading the values of command line arguments
of a software programmed/produced by a clisp compiler.

I think trying to understand the question _will_ save
_everybody_ a lot of time ;-) (OTOH I agree that the question
could be made more explicit/less ambiguous but the fact
that at least one poster understood the question is an
evidence that it is possible to understand it the right way)

-- 
Emre Sevinc

eMBA Software Developer         Actively engaged in:
http:www.bilgi.edu.tr           http://ileriseviye.org
http://www.bilgi.edu.tr         http://fazlamesai.net
Cognitive Science Student       http://cazci.com
http://www.cogsci.boun.edu.tr
From: Bulent Murtezaoglu
Subject: Re: clisp - command line parameters
Date: 
Message-ID: <87sm3wypmk.fsf@p4.internal>
>>>>> "ES" == Emre Sevinc <·····@bilgi.edu.tr> writes:
[...]
    ES> The address above talks about clisp command line arguments not
    ES> the method of reading the values of command line arguments of
    ES> a software programmed/produced by a clisp compiler.

http://clisp.cons.org/impnotes.html#argv

is a good start.

I found it by googling for "argv clisp."  One could argue that's 
cheating.

cheers,

BM
 
From: Sam Steingold
Subject: Re: clisp - command line parameters
Date: 
Message-ID: <ur7jfrvct.fsf@gnu.org>
> * Emre Sevinc <·····@ovytv.rqh.ge> [2005-02-17 01:54:31 +0200]:
>
> Sam Steingold <···@gnu.org> writes:
>
>>> * ········@gmail.com <········@tznvy.pbz> [2005-02-16 13:37:16 -0800]:
>>>
>>> I am using (dr) scheme as a student, which means i have some basic
>>> knowledge of lisp. I recently switched to "clisp". I am using debian
>>> gnu/linux and installed the clisp package.
>>>
>>> How can I read the command line parameters?
>>
>> what do you do if you need to find out "command line parameters" for
>> grep or ls?  you do "man grep" and "man ls".
>> same here - "man clisp" is your friend.
>> if that does not show the CLISP manual page,
>> you installation is severely broken.
>
> I think Can Burak wanted to learn how a program in clisp
> can read the command line arguments passed to itself. Not
> the command line options of starting the clisp.

I see.
David Sletten covered this case already.

> I think trying to understand the question _will_ save
> _everybody_ a lot of time ;-)

you are right.


-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
I don't want to be young again, I just don't want to get any older.
From: David Sletten
Subject: Re: clisp - command line parameters
Date: 
Message-ID: <oAPQd.11900$xX3.2892@twister.socal.rr.com>
········@gmail.com wrote:

> Hi from a newbie.
> 
> I am using (dr) scheme as a student, which means i have some basic
> knowledge of lisp. I recently switched to "clisp". I am using debian
> gnu/linux and installed the clisp package.
> 
> How can I read the command line parameters?
> 
> I couldn't find information via google and here is the only group which
> i can post on this subject. If it was irrelevant, thanks for spending
> your time.
> 

You need to upgrade to a newer version of Google:
http://clisp.cons.org/impnotes/environment-dict.html#argv
http://clisp.cons.org/impnotes/quickstart.html#script-exec

There is some disagreement about the use of the words "argument" and 
"parameter", but the convention is generally to speak of command line 
"arguments". This is reflected in C, Java, etc... whose main() functions 
usually refer to argc, argv, or args, for instance.

David Sletten
From: ········@gmail.com
Subject: Re: clisp - command line parameters
Date: 
Message-ID: <1108838844.593164.66040@o13g2000cwo.googlegroups.com>
David,
thanks for the pointer. I found that (args) is my best companion to get
the arguments.