enum coltype {red, blue, black, white} color;
color = blue; /* 変数 color に青を代入 */ if (color == red) /* もし,色が赤ならば */
enum coltype {red, blue, black=5, white} color;
red : 0, blue : 1, black : 5, white : 6
enum [列挙型名] [{列挙定数リスト}] [変数リスト];
enum coltype {red, blue, black, white}; enum coltype color;