any2Enum Function

Converts the object parameter to the equivalent enumerated text. The object parameter can be of almost any data type, but meaningful data is only obtained by using parameters of type str, real, or int.


enum any2Enum(anytype object)

Parameter

Description

object

The value to convert to an enumeration.

An enumerated text object.

static void any2EnumExample(Args _args)
{
    ABC a;
 
    str convert(anytype _value)
    {
        if (typeOf(_value) == Types::Enum)
        {
            return enum2Str(any2Enum(_value));
        }
    }
    ;
 
    a = ABC::B;
    print convert(a);
    pause;
} 

Community Additions

ADD
Show: