environ/3¶
environ(? EnvVar,+ EnvValue)*
Unify environment variable EnvVar with its value EnvValue, if there is one. This predicate is backtrackable in Unix systems, but not currently in Win32 configurations.
?- environ( 'HOME' ,V).
V = 'C:\\cygwin\\home\\administrator' ?
EnvVar may be bound to an atom, or just be unbound. In the latter case environ//22 will enumerate over all environment variables.