del_env(+atom)

This built-in predicate deletes an environment variable from the environment of the current process. If the environment variable was successfully deleted then the predicate is exited, else it fails.

see also: get_env/2 set_env/2

Examples
del_env('test'). If the environment of the current process has no variable called 'test' then the predicate fails.
set_env('test', 'value'),
del_env('test').
The variable 'test' is added to the environment, after that the variable 'test' is successfully deleted, the predicate is exited.

 

Exceptions
The argument is a variable an instantiation_error exception is thrown
The argument Arg is not an atom a type_error(atom, Arg) exception is thrown

 

 

info@trinc-prolog.com