Declaring Private Instance Variables
A private instance variable is private to the class, not just to the object instance. For example, consider a linked-list class where one instance needs to update the pointer in another instance. Another example is the following class declaration:
class Example private instance number &Num; end-class;A method of Example could reference another instance of the Example &Num instance variable as:
&X = &SomeOtherExample.Num;Avoid making every instance-scoped variable a public property. You should consider each variable individually and decide if it belongs in the public interface or not. If it does, decide if the variable warrants get or set modifiers and therefore should be a public property. If the variable only serves internal purposes to the class, it should be declared as a private instance variable.