getTypeName()

Returns the data type of any Control expression as string.

Synopsis

string getTypeName(expression);

Parameters

Parameter Description
expression Control expression to be examined.

Return value

Data type name of the CONTROL expression.

Description

Returns the data type of any Control expression as string.

The following constants are also available for querying the data type of CONTROL expressions:

When this function is used for anytype or shared_ptr, they are dereferenced and then the type is evaluated. In case they do not contain or point at any other variable, their own type is used.

Example

Condition as a function of the data type of the sum of the variables var1 and var2.

main()
{
    bool a;
    int b;
    dyn_int c;
    string d;
    float e;

    DebugN(getTypeName(a));
    DebugN(getTypeName(b));
    DebugN(getTypeName(c));
    DebugN(getTypeName(d));
    DebugN(getTypeName(e));
  }

The following is returned in the log viewer:

WCCOAui1:["bool"]
WCCOAui1:["int"]
WCCOAui1:["dyn_int"]
WCCOAui1:["string"]
WCCOAui1:["float"]

Assignment

Miscellaneous functions

Availability

CTRL