Loading...
 

CX_COUNTER::GetActiveFormatStrings

CX_COUNTER::GetActiveFormatStrings

224511
Description:

This method returns a vector with the two format strings(firstFormat & secondFormat) of the counter object. If the counter isdelegated, then the format of the most delegated counter object is returned. If the formats are not yet set, then a vector with two empty strings "" is returned.

If formatting has been disabled via the flags (from CX_COUNTER) in the delegated counter, then the formats of this counter object are returned and if formatting has also been disabled here, then an empty vector is returned.
Whether the counter (or the delegated counter) is enabled or disabled does not matter for this method.

GetActiveFormatStrings thus returns the formatting applied by all FormattedDelegated methods of CX_COUNTER , with the difference that no formatting is applied if the counter is disabled.

The first vector element is firstFormat (the control characters) and the second element is secondFormat (the constant text).

Code example:
Var(counter) CreateTransObject(CX_COUNTER) -> counter "000000" counter Put(firstFormat) "xxxxxx" counter Put(secondFormat) counter Call(GetFormatStrings) // -> [ "000000" "xxxxxx" ] 2 counter Put(flags) counter Call(GetFormatStrings) // -> [ ]

Stack
Stack Position Object type Brief description
Stack(In) Top CX_COUNTER The counter object
Stack(Out) Top VECTOR〈STRING〉 The format strings as a vector
Function call: Call(GetActiveFormatStrings)