enum
Creates an enumeration specifier. Enumeration allows a series of constant integers to be easily assigned. The format to create a enumeration specifier is:
enum identifier {enumerator-list};Identifier is a handle for identification, and is optional. Enumerator-list is a list of variables to be created. Each variable must be a constant integer, and is given the value of the previous variable plus 1. The first variable is given the value of 0.
Example
In the following example, the day enum, today, is set to Sat. Note that because Fri is set to 100, Saturday takes the successive value.
enum day {Sun, Mon, Tue, Wed, Thu, Fri = 100, Sat};
int i;
enum day today;
today = Sat;
lr_output_message ("Value of today is %i", (int)today);Example: Output:
Action.c(11): Value of today is 101

