Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Overview of class-based ABL : Accessing data members and properties : Comparison with procedure-based programming
 
Comparison with procedure-based programming
You access variables and other ABL data elements defined in procedures the same way no matter where and how they are defined—simply by referencing their names or handles (as appropriate). So, for example, a variable defined as NEW GLOBAL SHARED in one procedure, once defined as SHARED in a second procedure, can be accessed by name as if it were newly defined in the second procedure. No such mechanism exists or is required for data members or properties.
Also, where you define variables in a procedure as SHARED in order to access them from outside the procedure, you define data members or properties of a class as PUBLIC in order to access them from outside the class.