Enumerations

Implicit:

enum {Apple, Banana, Cherry};   # numbered 0 through 2

Explicit:

enum {
    Apple=3,
    Banana,         # gets the value 4
    Cherry="a",
    Orange,         # gets the value "b"
};

Last updated