Enumerations

Enumerations are unique types with values taken from a group of known constants called enumerators.

The table summarizes the public methods available for enumerations.

Method

Returns

Usage

enum1.​ConvertTo

​Numerical()

udisc

Returns the value of the enumerator selected for enum1.

The return type depe​nds on the value of the selected enumerator (positive value – udisc, negative value – sdisc).

enum1.min(enum2)

enumeration

Returns the lower of the two enumerators selected for enum1 and enum2.

enum1.max(enum2)

enumeration

Returns the upper of the two enumerators selected for enum1 and enum2.

enum4.between(enum2,enum3)

log

Checks whether the enumerator of enum4 lies between the enumerators selected for enum2 and enum3.

Note

All involved enumerations must be of the same type.

In ESDL, these methods can be used as shown in the following example, provided that all enumerations are of the same type:

udisc = enum1.convertToNumerical();

enumMax = enum1.max(enum2);

enumMin = enum1.min(enum2);

logVar = enum1.between(enum2,enum3);

ClosedEXAMPLE

All enumerations are of the following type:

If enum1, enum2,and enum3 are set as shown in the left figure, udisc, enumMax, enumMin, and logVar are computed as shown in the right figure.

See also

Component Manager – Creating an Enumeration

Component Manager – Adding an Enumerator

Data Editor – Selecting an Enumerator