The enum keyword defines a set of constants of type
int. It is used as follows:
enum 〚tag〛 {name 〚= value〛, ...};
Where
tag
is the name of the enum set.
name
is the name of an enum constant.
value
is 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 tagname 〚= value〛;
Where
tag
is the name of the enum set.
name
is the name of the variable.
value
is the value assigned to the variable.
Refer to 2-Byte Scalars for
information regarding the format of enum constants.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.