UNIX: If Name is the name of a UNIX environment variable, this variable's value is returned. As an additional feature, if there exists an environment variable whose name is the concatenation of the value of Name and the ECLiPSe version number (e.g. "ECLIPSEDIR_4_9" if Name is "ECLIPSEDIR" and the version is 4.9), then this variable's value is returned instead.
WINDOWS: The name Name is looked up in the registry under the key HKEY_LOCAL_MACHINE\SOFTWARE\IC-Parc\ECLiPSe\<version>. If there is such an entry, its value is returned. Otherwise, Name is taken as the name of an environment variable, whose value is returned if it exists.
If the lookup operation is unsuccessful, the predicate fails.
Success: getenv('HOME',V). (gives V="/home/username"). getenv("SHELL",V). (gives V="/bin/csh"). getenv('TERM',V). (gives V="sun-cmd"). getenv('USER',V). (gives V="username"). Fail: getenv('HOEM',V). Error: getenv(TERM,V). (Error 4). getenv('TERM',atom). (Error 5). getenv(1,V). (Error 5).