The keyword enum introduces an enumerated type, a set of name to integer value associations.
which is equivalent to:
Extracting the integer value of a enum is just a matter of casting it to an int:
Its possible to define partial enums:
Labels:
