Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

argv

24 views
Skip to first unread message

Josef Eschgfaeller

unread,
Jun 13, 1999, 3:00:00 AM6/13/99
to

What is the substitute for argv in Lisp?

J. Eschgfaeller


Arthur Lemmens

unread,
Jun 13, 1999, 3:00:00 AM6/13/99
to

Josef Eschgfaeller wrote:
>
> What is the substitute for argv in Lisp?

There is no portable substitute for argv.
In Harlequin Lispworks, I use sys:*line-arguments-list*.

Arthur Lemmens

Lars Marius Garshol

unread,
Jun 13, 1999, 3:00:00 AM6/13/99
to

* Josef Eschgfaeller

|
| What is the substitute for argv in Lisp?

argv is a Unix-ism and so not portably available in Common Lisp. I
guess most implementations provide some means of accessing the
command-line arguments, but these are not standardized.

In CLISP the variable *args* holds the arguments in a list.

--Lars M.

Thomas A. Russ

unread,
Jun 14, 1999, 3:00:00 AM6/14/99
to

> * Josef Eschgfaeller asks:

> | What is the substitute for argv in Lisp?

Lars Marius Garshol <lar...@ifi.uio.no> writes:
> In CLISP the variable *args* holds the arguments in a list.

For ACL (Allegro Common Lisp) on Unix:

(sys:command-line-arguments)

which IIRC gets the entire command line, including the program name:

Unix> acl -- foo=bar 3 twenty '(1 22 3 )'

Lisp> (sys:command-line-arguments)
("/local/acl/acl5.0/lisp" "foo=bar" "3" "twenty" "(1 22 3 )")


--
Thomas A. Russ, USC/Information Sciences Institute t...@isi.edu

Marco Antoniotti

unread,
Jun 15, 1999, 3:00:00 AM6/15/99
to

Josef Eschgfaeller <e...@felix.unife.it> writes:

> What is the substitute for argv in Lisp?

On a Mac?

Note that the following program is considered (or was considered) non
portable.

public class nonPortable {
public static void main(String[] argv) {
System.out.println(argv[0]);
}
}

Cheers

--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa

0 new messages