Enumeration types are an essential ingredient in writing human readable source code. Due to their special nature, special care must be taken when deciding how to use them and - even more importantly - assessing implications of their use. ex:- c++ enum myenum {white, black, red, green, blue, magenta, yellow, cyan }; the default value attached is {0,1,2,3,4,5,6,7} niv
An enumeration in programming is a list of literals, grouped together for a common purpose. Members of an enumeration typically describe similar things by providing an alphanumeric mnemonic as a representative of a numerical identifier.
For example, a Colors enumeration might be defined to contain the three member names Red, Blue and Green, representing numeric values 1, 2, and 3 (or any other value), respectively.
In traditional languages such as C, enumerations are a convenience tool to improve readability of code. In C and similar languages, enumerations are not strongly typed, and allow assignment to and from integer values or other enumerations. In more modern languages, enumerations are strongly typed, so that Red from the Colors enumeration shown above cannot be confused with or assigned to Red from the Meatsenumeration.
It's text that is inherently linked to an integer, for example in computer programming, we might want to send commands and not have to memorize all the values we use, so we set up some enumeration that says "0 = do nothing", "1 = read", "2 = write", "3 = modify". The values I chose are arbitrary. In our code, we could then say "read" instead of "1" and it helps the programmer keep their head straight.
It means to count off or name one by one; list (Verb)
Boolean is an example. It has two values: false and true.