Enumerations

Enumerations are sets of related integer constants, where each value has a name. Studio has built-in support for enumerations (sequential and non-sequential). These are some properties of enumerations:

Using Enumerations

Enumerations can be used with a qualified name:
action = Action.SKI
or without qualification, when the type of the enumeration can be inferred from the context:
action = SKIP
To check the value of an Enumeration, you can use the is operator:
if action is CANCEL then
//Do something
end
or if you prefer, the multi-path conditional statement:
case action
when SKIP then
// Process SKIP
when CANCEL then
// Process CANCEL
else
// Handle all other values
end

Creating Enumerations

For further information on creating enumerations, refer to: Enumerations