Subject: Re: Hypercube in lisp (newbie)
From: (Rob Warnock)
Date: Thu, 25 Aug 2005 03:12:55 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Pascal Bourguignon  <> wrote:
| (defun get-environment-variable (string)
|   #-clisp (cdr (assoc string ext:*environment-list* :test #'string=))
|   #+clisp (ext:getenv string))

I tend to use this one, which covers a few more cases:  ;-}

    ;;; GETENV -- Mostly-portable code for accessing Unix
    ;;; (or Windows?) environment variables. Morphed very slightly
    ;;; from <URL:>
    ;;; Copyright (c) 2002 The Common Lisp Cookbook Project 
    ;;; See: <URL:>
    (defun getenv (name &optional default)
       #+CMU (cdr (assoc name ext:*environment-list* :test #'string=))
       #+Allegro (sys:getenv name)
       #+CLISP (ext:getenv name)
       #+ECL (si:getenv name)
       #+SBCL (sb-unix::posix-getenv name)
       #+LISPWORKS (lispworks:environment-variable name)


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607