GetEnum( ) method

Returns an enum instance of the specified enum member.

Return type: Enum type

Access: PUBLIC

Applies to: Progress.Reflect.AccessMode enumeration, Progress.Reflect.DataType enumeration, Progress.Reflect.Flags enumeration, Progress.Reflect.ParameterMode enumeration, any user-defined enum type

Syntax

GetEnum ( INPUT enum-member-name AS CHARACTER )

GetEnum ( INPUT value AS INT64 )
enum-member-name
The name of an enum member of the enum type the method is invoked on. For a flag enum type, this can be a comma-delimited list of enum members.
value
The underlying numeric value of an enum member of the enum type the method is invoked on. For a flag enum type, this value can represent two or more members.

The method returns an error if a name or numeric value does not correspond to a member of the enum type. The exception to this is that you can pass a value of 0 for a flag enum type even if no member has been explicitly defined for 0.

Both of the lines of code in the following example create an enum instance of type Progress.Reflect.AccessMode and assign vAccess the member Public :

DEFINE VARIABLE vAccess AS AccessMode.

vAccess = AccessMode:GetEnum("Public").
vAccess = AccessMode:GetEnum(1).

Notes