any2Real Function

Converts object to the equivalent decimal figure. object can be of almost any data type but useful output is obtained for input elements of type date, int, enum, and str.


real any2Real(anytype object)

Parameter

Description

object

The value to convert.

A real number.

static void any2RealExample(Args _args)
{
    real convert(anytype _value)
    {
        if (typeOf(_value) == Types::Real)
        {
            return any2Real(_value);
        }
    }
    ;
 
    print convert(3.14);
    pause;
}

Community Additions

ADD
Show: