manifest enum

Russell Lewis webmaster at villagersonline.com
Wed Jan 2 11:07:53 PST 2008


Janice Caron wrote:
> On 1/2/08, Russell Lewis <webmaster at villagersonline.com> wrote:
>> Have a look at this code:
>>
>>    enum Named {
>>      uint foo = 1;
>>           bar = 2;
>>    };
> 
> I don't think that will compile. The whole point of naming an enum is
> to create a new type, so that you can subsequently declare:
> 
>     Named x;

Sorry, right.  So this:
     enum Named {
       foo = 1U;
       bar = 2;
     };



More information about the Digitalmars-d mailing list