%Enum

This special method returns an attribute mark delimited string that lists the field names in an internal object. However, it does not recurse through nested objects.

The %Keys method is a synonym for the %Enum method.

All special method names and keywords are case-insensitive.

Syntax

object->%Enum()

object->%Keys()

Syntax elements

objectAn expression that evaluates to an internal object.

Applicability

Internal objects only.

Example

Dylan = %New()
Dylan->firstName = "Bob"
Dylan->lastName = "Dylan"
Dylan->dateOfBirth = 1941

Lists the fields of the Dylan object in an MV string

PRINT Dylan->%Enum()

which produces

firstName^lastName^dateOfBirth

where ^ represents an attribute mark.