top of page
Enum
Enum
​
An enumumerated type contains identifiers that can be used like constants.
​
enum <name> (values...)
​
> enum Days (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
Two enum values can be compared based on the integer value assigned to them
​
> Mon < Tue
True
​
> Tue > Wed
False
​
You can access an enum value from the name of the enum with its index
​
> Days !! 1
Tue
bottom of page