32.8. Operating System Environment

Most modern operating systems support environment variables that associate strings (variables) with other strings (values). These variables are somewhat similar to the SPECIAL variables in Common Lisp: their values are inherited by the processes from their parent process.

You can access your OS environment variables using the function (EXT:GETENV &OPTIONAL string), where string is the name of the environment variable. When string is omitted or NIL, all the environment variables and their values are returned in an association list.

You can change the value of existing environment variables or create new ones using (SETF (EXT:GETENV string) new-value).


These notes document CLISP version 2.49Last modified: 2010-07-07