[Openmcl-devel] TIL how to access command line arguments in a saved application
Ron Garret
ron at flownet.com
Sat Aug 11 16:52:23 PDT 2012
Today I tried this:
[ron at mighty:~]$ ccl
Welcome to Clozure Common Lisp Version 1.9-dev-r15341M-trunk (DarwinX8664)!
? (defun foo () (print CCL:*UNPROCESSED-COMMAND-LINE-ARGUMENTS*) (print 'foo))
FOO
? (save-application #P"~/foo" :prepend-kernel t :toplevel-function 'foo)
[ron at mighty:~]$ ./foo baz bar -- bing boff
NIL
FOO
Not the result I was expecting. So I dug around in the sources and discovered that the way to access command line arguments in your own top-level function is through the global variable *command-line-argument-list*.
FYI.
rg
More information about the Openmcl-devel
mailing list