enum

Dicebot public at dicebot.lv
Tue Apr 8 14:16:09 PDT 2014


On Tuesday, 8 April 2014 at 21:12:10 UTC, Walter Bright wrote:
> 6. An integral type, some of which have names:
>
> enum Color {
>     Red = 0xFF0000,
>     Green = 0x00FF00,
>     Blue = 0x0000FF00,
>     Fred = 0x123456,
>     White = 0xFFFFFF }

This is not an integral type but collection of named constants 
with shared qualified path. Probably most common use case and one 
that should not have been part of enum design but a separate 
concept.


More information about the Digitalmars-d mailing list