clear_var(+var)

This predicate clears the value of a variable, i.e. the variable argument of this predicate will be an empty variable after exiting.

see also: add_callback/3 add_callback/4 callbacks class_name/2 del_obj/1 get_instance/2 instance/1 new_obj/2 new_obja/2  nonvar/1 ispresent_callback/4 object-oriented prolog remove_callback/4 <-/2 ::<-/1 ::<-/2 this/1 var/1

Example
X=[1], clear_var(X).
X=[], clear_var(X).

 

Exceptions  
Argument is not a variable a type_error(variable, Arg) exception is thrown

 

 

info@trinc-prolog.com