-var new_obja +class_name

This operator is used for creating new class instances, the left operand of this operator must be an empty variable and the right operator must be a class name or a non-empty variable. The default name of the instance is the name of the class, the name of the instance can be changed by using the operator obj_name/2.

The new instance is added to the module as the first clause of the module like asserta/1.

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

Examples  
File new_obja menu if the new menu instance was created then it was assigned to the empty variable File

 

 

info@trinc-prolog.com