Re: argv[0] not available to CLISP programs
Sam Steingold <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
> * Andrew Pennebaker <[email protected]> [2012-11-20 11:43:30 -0500]: > > This isn't completely accurate. what isn't? > *LOAD-TRUENAME* is overwritten when you (load) other code files, bound, not overwritten. > so it doesn't let you reliably get the original script name. I don't think I quite understand your use case. Are you trying to figure out whether a particular file is the "main script" as opposed to being loaded from some other script? One way to do this is to check your own variable *main* and bind it if it is not bound already. This is portable. Another way is to use SYS::*LOAD-LEVEL*, which is bound to incremented values by LOAD. Yet another way is EXT:ARGV http://clisp.org/impnotes/environment-enq.html#argv 2 years ago you asked about this here: http://sourceforge.net/tracker/?func=detail&aid=3124233&group_id=1355&atid=351355 can you offer a better rationale than then? Maybe you want to continue this discussion there? -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://www.PetitionOnline.com/tap12009/ http://americancensorship.org http://honestreporting.com http://pmw.org.il If I had known that it was harmless, I would have killed it myself. ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel