enum

Steven Schveighoffer schveiguy at yahoo.com
Tue Apr 8 14:49:45 PDT 2014


On Tue, 08 Apr 2014 17:12:17 -0400, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> 6. An integral type, some of which have names:
>
> enum Color {
>      Red = 0xFF0000,
>      Green = 0x00FF00,
>      Blue = 0x0000FF00,
>      Fred = 0x123456,
>      White = 0xFFFFFF }

That was Andrei's UserId example...

On Tue, 08 Apr 2014 15:08:46 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> 3. A discrete set of categorical values, not all of which are named:
>  enum UserID : ulong { nobody, expired = ulong.max }

-Steve


More information about the Digitalmars-d mailing list