Loading...
 

MLTransform

MLTransform

MLTransform(name)

Parameter: Name of an enumeration data field or the name of the table or table function.

Stack
Stack Description
Stack(In) integer
Stack(Out) multilingual string (ML_STRING)

The value from the stack-top is transformed into a multilingual character string. The transformation table specified in the parameter is used. The table can be specified directly or indirectly with reference to a data field:

  • The name has the form filename~table name. The specified table is used.
  • The name does not contain a tilde, i.e. a data field was specified. The connection between data field and transformation table is established by CLASSIX.INI. If an access expression is specified, its last term determines the transformation table.

If the transformation table does not contain a corresponding entry, INVALID is returned.

Note: Before Dll version 227553, an empty ML_STRING was returned instead of INVALID.

If the statement finds a string on the stack top, the reverse transformation is performed:

Stack
Stack Description
Stack(In) Character string
Stack(Out) integer

MLTransform(name, separator sequence)

parameters: Name of an enumeration data field or the name of the table, separator between two names

Stack
Stack Description
Stack(In) integer
Stack(Out) Character string

For a transformation table, which should only contain values 2n, the value is interpreted by the stack top as a bit field and as a result you get a string consisting of the names of all bits = 1. Successive names are separated by the character string specified in the second parameter.

If after translation into bits the value could not be reduced to 0, then the remainder is added at the end as a numeric value separated by the separator (Ex: ";32"). This also means that in case no bit was found in the passed value, the entire numeric value corresponds to the remainder and is returned as ML_STRING (without the leading separator).

The bit transformation in reverse direction is not available at the moment!

Note: If you need the result of the transformation into the enumeration name as a simple character string (depending on the current language - compare statement Language), the statement Transform should be used