instance(?term)

This type testing predicate succeeds if it's argument is an instance of a Prolog class, else it fails.

see also: add_callback/3 add_callback/4 atom/1 atomic/1 callbacks class_name/2 clear_var/1 compound/1 del_obj/1 float/1 get_instance/2 new_obj/2 new_obja/2  nonvar/1 number/1 ispresent_callback/4 object-oriented prolog remove_callback/4 <-/2 ::<-/1 ::<-/2 this/1 var/1

Examples
instance(X). Fails.
X=frame, instance(X). Fails.
X new_obj frame, instance(X). Succeeds if the module 'win.txt' was successfully loaded first.

 

 

info@trinc-prolog.com