Comparison with procedure-based programming shared variables
- Last Updated: February 15, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
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.