C251 User's Guide

enum

The enum keyword defines a set of constants of type int. It is used as follows:

enum 〚tag〛 {name 〚= value〛, ...};

Where

tagis the name of the enum set.
nameis the name of an enum constant.
valueis the value assigned to the constant. If the value is missing, then it is assumed to be the value of the previous constant in the set +1. The default value for the first constant in the list is 0.

Define an enum type in the program as follows:

enum tag name 〚= value〛;

Where

tagis the name of the enum set.
nameis the name of the variable.
valueis the value assigned to the variable.

Refer to 2-Byte Scalars for information regarding the format of enum constants.