Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming

> ## Defining class data types

> To support strong typing of object references, each class and interface type can be used as a data type in a variable definition. The variable can then be used to hold an object reference to an instance of a class. (You cannot create an instance of an interface.) The data type name that defines the object reference can identify a class or an interface. If it identifies an interface, the object reference is used to point to an instance of a class that implements the specified interface. (An object reference can never point to an instance of an interface.)

> An object reference is comparable to the `HANDLE` data type, with the important distinction that the object reference identifies the specific class type that the variable or field can be used to hold. This allows the compiler to verify that all uses of the object reference are correct, which is not possible with a weakly typed handle.

> In addition to variables, you can also define a class or interface type to specify the following object references:

> - A parameter to a method, internal procedure, or user-defined function.

> - A return type for a method or user-defined function.

> - A field in a temp-table, which must always be defined as the root class data type, `Progress.Lang.Object`.

> For more information on defining and using object references to class and interface data types, see Chapter 4, " Programming with Class-based Objects."

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095