Object (Instance) Variables (Attributes)

Every object has its own set of instance variables, also known as attributes. These are variables associated solely with the object. When an object's method runs, it first identifies the instance variables (attributes) it intends to work with. Technically, it "exposes" these instance (object) variables, using the Rexx instruction EXPOSE. Exposing the object's variables distinguishes them from variables used by the method itself, which are not exposed. Every method an object owns-that is, all the instance methods in the object's class-can expose variables from the object's instance variables (attributes).

Therefore, an object's instance variables includes variables:

A class's object variable (attribute) pool, together with the methods that expose them, is called a class scope. Rexx exploits this class scope to achieve concurrency. To explain in more detail, the object's instance variables are contained in a collection of instance variable (attribute) pools. Each instance variable (attribute) pool is at a different scope in the object's inheritance chain. Methods defined at different class scopes do not directly share data, and can therefore run simultaneously.

Scopes, like objects, hide and protect data from outside manipulation. Methods of the same scope share the instance variable (attribute) pool of that scope. The scope shields the instance variable (attribute) pool from methods operating at other scopes. This is why you can reuse object variable (attribute) names from class to class, without the variables (attributes) being accessed and possibly corrupted by a method outside their own class. So class scopes serve to divide an object's instance variables (attributes) into pools that can operate independently of each another. Several methods can use the same object instance variables (attributes) concurrently, as long as they confine themselves to instance variables (attributes) in their own scope.