PreviousNextIndex

Type-name syntax

Specifies the name of an ABL or .NET data type that you can specify as a single instance or as an array of such instances. Thus, an ABL data type can be a built-in primitive type or an array of such primitive types, or it can be a class-based built-in or user-defined object type (such as a class or an interface type) or an ABL array of such object types. A .NET data type can only be a class-based object type (such as a class, structure, enumeration, or interface) or an ABL array of such object types. The EXTENT option, used to define an array of types, is thus counted as part of the array type name.

Syntax

{ primitive-type-name | object-type-name } [ EXTENT [ constant ] ] 

primitive-type-name
object-type-name
[ " ] ABL-object-type [ " ]
package-name
class-or-interface-name
[ " ] dotNET-object-type [ " ]
namespace
dotNET-object-name
inner-name
EXTENT [ constant ]
Examples

If your PROPATH is "C:/myfiles", and your class definition file name is "C:/myfiles/acme/myObjs/CustObjs.cls", then ABL requires package-name to be "acme.myObjs." and class-or-interface-name to be "CustObjs".

The .NET Button class is in the System.Windows.Forms namespace. Therefore, you reference its qualified (complete) type name like this:

System.Windows.Forms.Button 

The .NET ControlCollection class is an inner class of System.Windows.Forms.Control. Therefore, you reference its qualified type name like this:

System.Windows.Forms.Control+ControlCollection 

The following code fragment defines object references to the .NET type, System.Drawing.Point, and to a one-dimensional .NET array of System.Drawing.Point elements:

DEFINE VARIABLE rPoint      AS CLASS System.Drawing.Point NO-UNDO. 
DEFINE VARIABLE rPointArray AS CLASS "System.Drawing.Point[]" NO-UNDO. 

Notes
See also

Class-based data member access, Class-based method call, Class-based property access, CLASS statement, Data types, DEFINE VARIABLE statement, INTERFACE statement, NEW function (classes), USING statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex