Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Overview of class-based ABL : Defining data members
 

Defining data members

Variables and many other data elements that you can define within the main block of a class are known as its data members. The DEFINE statements for data members include support for an access mode. The available access modes (PRIVATE, PROTECTED, or PUBLIC) differ depending on the type of data member. By default, all data members are PRIVATE.
Note: Data members cannot be abstract.
ABL also supports static data members that are associated with a class type rather than a class instance. Unless otherwise specified, any reference to a data member in this manual refers to an instance data member. For more information on static class members, see Usingstatic members of a class.
For information on the ABL to access data members, see Accessing data members and properties. For more information on defining data members, see Defining data members within a class. You can also define class members known as properties, which combine features of data members and methods in a single class member. For more information, see Definingproperties.
* Comparison with procedure-based programming