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
* 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.
> * Josef Eschgfaeller asks:
> | What is the substitute for argv in Lisp?
Lars Marius Garshol <······@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 ···@isi.edu
Josef Eschgfaeller <···@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