next up previous contents
Next: EXIT - keyword Up: The CMOD API Previous: Overview of This Tutorial   Contents

INIT - keyword

INIT is used to set an initialization callback. Each class ought to have an INIT. What stands in between the curly brackets of INIT is what will be done upon initialization of an object of that class. In the example below two object variables called number_of_iterations and current_string are assigned their initial values.

/*Example of usage:*/
   INIT{
     THIS->number_of_iterations = 0;
     THIS->current_string = "";
   }



2003-03-04