argv 
Author Message
 argv

What is the substitute for argv in Lisp?

J. Eschgfaeller



Thu, 29 Nov 2001 03:00:00 GMT  
 argv

Quote:

> 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



Thu, 29 Nov 2001 03:00:00 GMT  
 argv

* 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.



Thu, 29 Nov 2001 03:00:00 GMT  
 argv

Quote:
> * Josef Eschgfaeller asks:
> | What is the substitute for argv in Lisp?


Quote:
> 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 )")

--



Fri, 30 Nov 2001 03:00:00 GMT  
 argv

Quote:

> 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]);
  }

Quote:
}

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



Sat, 01 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. sys.argv[0] - 'module' object has no attribute 'argv'

2. argv filename for J7

3. gawk problem retrieving ARGV (Sun vs Linux)

4. Crazy ARGC/ARGV behavior

5. ARGV question

6. argv

7. gawk executable scripts and ARGV[0]

8. ArgC/ArgV - Command Line Parsing

9. : Passing array to C func() expecting argv

10. Forth argv and argc

11. Equivalent of argv(0) in Clipper/Xbase++ ???

12. Syntax Question: ARGV/ARGC for Eiffel

 

 
Powered by phpBB® Forum Software