%ToMV

This special method converts the non-object fields of an internal object to an attribute- and value-mark delimited multi-value string. (Object fields are ignored.)

All special method names and keywords are case-insensitive.

Syntax

object->%ToMV({Delim, delimiter})

Syntax elements

objectAn expression that evaluates to an internal object.

delimiterThe MV string delimiter (defaults to AM for attribute mark).

Applicability

Internal objects only.

Example

Given:

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

Converts the Dylan object to an MV string.

PRINT Dylan->%ToMV(Delim, AM)

which produces:

firstName]Bob^lastName]Dylan^dateOfBirth]1941

where ^ represents an attribute mark and ] represents a value mark.

See also

%New, %ToJSON, %ToXML