getenv

getenv — retrieves the value of an environment variable.

Syntax

getenv (envar)

		

Arguments

envar

A string.

Returns

A string containing the value of the given environment variable, or nil if the environment variable is not defined.

Description

This function retrieves the value of an environment variable from the current process's environment. The environment variable must have been set or defined previously by a call to setenv.

Example

Gamma> setenv("high", "40");
t
Gamma> getenv("high");
"40"
Gamma> low = 20;
20
Gamma> getenv("low");
nil
Gamma> 
		

See Also

setenv