ENUMs
An enumeration, or enum, is a data type that defines a finite set of named values. Each value is a distinct member of the domain and can be treated as a value of the type. Enums model discrete categories, such as days of the week, cardinal directions, or status codes, and they help improve code readability and enforce that variables stay within a defined set.
Semantics vary among languages. In many imperative languages, an enum has an underlying integral type and the
Common features include: underlying type selection, scope of names, explicit versus automatic value assignment, and the
Enumeration values can often be enumerated, converted to and from their numeric or string representations, and
C: enum Color { Red, Green, Blue };