reading an environment variable



> From:  Robert Dodier
> Sent: Tuesday, 21 June 2005 15:55
> To: Fabrizio Caruso; maxima@math.utexas.edu
> Subject: Re: [Maxima] reading an environment variable
> 
> 
> Hi Fabrizio,
> 
> > (2) to check whether maxima is running under
> > windows or linux?
> 
> The Lisp variable *FEATURES* is a list of implementation-
> dependent keywords; different Lisp implementations put
> different stuff in this list, but the three I can check
> (clisp, cmucl, and gcl) all put :UNIX on the list
> (I'm running linux). No guarantee here, but maybe 
> 
>   (%i1) :lisp (defun $unixp () (not (null (memq ':unix *features*))))
>   $UNIXP
>   (%i1) unixp();
>   (%o1)                         true
> 
> is useful to you -- presumably a Windows Lisp won't have :UNIX.

unless it is clisp on cygwin

[1]> *FEATURES*
(:REGEXP :SYSCALLS :LOOP :COMPILER :CLOS :MOP :CLISP :ANSI-CL :COMMON-LISP
 :LISP=CL :INTERPRETER :SOCKETS :GENERIC-STREAMS :LOGICAL-PATHNAMES :SCREEN
 :FFI :GETTEXT :UNICODE :BASE-CHAR=CHARACTER :PC386 :UNIX :CYGWIN)


> 
> For what it's worth,
> Robert Dodier
>


NOTICE
This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
This notice should not be removed.