Node: Environment, Next: , Previous: File Primitives, Up: System Procedures



Environment

getenv str STKLOS Procedure
getenv STKLOS Procedure
Looks for the environment variable named str and returns its value as a string, if it exists. Otherwise, getenv returns #f. If getenv is called without parameter, it returns the list of all the environment variables accessible from the program as an A-list.
          (getenv "SHELL")
               => "/bin/zsh"
          (getenv)
               => (("TERM" . "xterm") ("PATH" . "/bin:/usr/bin") ...)
          

setenv! var value STKLOS Procedure
Sets the environment variable var to value. Var and value must be strings. The result of setenv! is void.