#include #include #include enum(char *) Colour { Red = "red", Green = "green", Blue = "blue" }; // enum( signed char ) srgb { Red = -1, Green = 0, Blue = 1 }; enum Plain { A, B, C = 10 }; int main () { Colour fishy; fishy = Colour.Green; fishy; Colour c2 = fishy; sout | "Enumeration Constant:: value: " | value(Colour.Blue) | ", position: " | posn(Colour.Blue) | ", label: " | label(Colour.Blue) | ", default output: " | Colour.Blue; sout | "Runtime Value:: value: " | value(fishy) | ", position: " | posn(fishy) | ", label: " | label(fishy) | ", default output: " | fishy; sout | "Runtime Value:: value: " | value(c2) | ", position: " | posn(c2) | ", label: " | label(c2) | ", default output: " | c2; Colour.Red; char * ao = Colour.Red; char * ko = fishy; printf( "ao is %s\n", ao ); printf( "ko is %s\n", ko ); printf( "%d, %d, %d, \n", A, B, C ); Plain a = B; printf( "%d \n", a ); }