enumValues()
The function returns the values of an enumeration as mapping.
Synopsis
mapping enumValues(string enumName)
Parameter
Parameter | Description |
---|---|
enumName | Name of the enumeration |
Return value
Mapping with the names of the enumeration items as keys and the corresponding integers as value.
Error
-
Description
The function returns the values of the enumeration as mapping with the keys representing the names of the entries and the corresponding integers as values. The sorting of the mapping is arbitrary and is not corresponding to the order in which the entries have been added,
Example
enum enumLocal{ A, B, C };
main(mapping event)
{
DebugN(enumValues("enumLocal"));
}
Output of the script to the LogViewer:
WCCOAui1:[mapping 3 items
WCCOAui1: "C" : 2
WCCOAui1: "B" : 1
WCCOAui1: "A" : 0
WCCOAui1:]
Assignment
Misc. Functions
Availablilty
UI, CTRL