get-environment-variable -- r7rs Definition procedure;
get-environment-variable (from vonuvoli);Procedure variants:
((string-not-empty) -> (string-not-empty-or-false))
string-not-empty;string-not-empty-or-false;scheme:process-context -- (scheme process-context);scheme -- (scheme);(get-environment-variable name)Many operating systems provide each running process with an environment consisting of environment variables. (This environment is not to be confused with the Scheme environments that can be passed to
eval: see section on environments and evaluation.) Both the name and value of an environment variable are strings. The procedureget-environment-variablereturns the value of the environment variablename, or#fif the named environment variable is not found. It may use locale information to encode the name and decode the value of the environment variable. It is an error ifget-environment-variablecan't decode the value. It is also an error to mutate the resulting string.(get-environment-variable "PATH") ===> "/usr/local/bin:/usr/bin:/bin"
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.