Data members of a class hold runtime values for a class instance. Whenever an instance of a class is created, each instance has its own values for the data members of the class. The values for the data members of a class instance are assigned when the instance is created or are assigned by the methods of the class.

You can define four types of data members for an ABL class:

Data member type

Description

variable

Holds a value of a built-in type or user-defined type. A best practice is to define variables as PRIVATE or PROTECTED so that they can only be accessed by methods of the class.

property

Holds a value of a built-in type or user-defined type. A property is like a variable, but it allows you to customize how its values will be read or set. A best practice is to define properties as PUBLIC for reading and PRIVATE or PROTECTED for setting. This enables you to control how data is accessed by code from other parts of your application.

temp-table

Holds aggregate data such as a database record in a relational database table. A temp-table typically holds data of multiple types. A best practice is to define a temp-table as PRIVATE.

dataset

Holds data that represent a set of temp-tables.

For more information, see Define data members and Comparison with procedure-based programming.