getenv
 
 
 

Returns the string value assigned to a system environment variable

(getenv variable-name) 

Arguments

variable-name

A string specifying the name of the variable to be read. Environment variable names must be spelled and cased exactly as they are stored in the system registry.

Return Values

A string representing the value assigned to the specified system variable. If the variable does not exist, getenv returns nil.

Examples

Assume the system environment variable ACAD is set to /acad/support and there is no variable named NOSUCH.

Command: (getenv "ACAD")

"/acad/support"

Command: (getenv "NOSUCH")

nil

Assume that the MaxArray environment variable is set to 10000:

Command: (getenv "MaxArray")

"10000"

See Also