Control Structures

to get contents

Supported By

Syntax

to get contents
   statementList
end get

Description

The to get contents handler defines the behavior of a user-defined object when its contents are accessed or it is converted to a string. When a script requests the contents of a user-defined object, or converts the object to a string, the statements in the to get contents handler are executed, and the return value of the handler becomes the resulting string.

If no to get contents handler is defined for a user-defined object type, objects of that type cannot be accessed as containers, and converting an object of that type to a string results in a descriptor for that object.

Note

This structure is only valid inside an object type structure.

Compatibility

In OpenXION 1.3 or later, due to a more correct understanding of how containers work, user-defined objects can no longer be containers, and this structure is no longer supported.

See Also

object type