PhobosWatch: manifest => enum

Derek Parnell derek at psych.ward
Fri Dec 28 13:43:35 PST 2007


On Fri, 28 Dec 2007 10:35:38 -0800, Walter Bright wrote:

> Sean Kelly wrote:
>> The weird thing for me is that this will allow individual enums of any 
>> type but grouped enums of only numeric types.
> 
> The following will work:
> 
> enum
> {
>      x = 3,   // x is int
>      y = 4L,  // y is long
> }
> 
> The idea is that for anonymous enums, there is no type for the 
> enumeration as a whole. Therefore, each member of the enumeration can 
> have a different type.

Will your syntax allow declarations of single values? e.g.

  enum x = 3;
  enum y = 4L;

Or will we have to use the {} form?

   enum {x = 3}
   enum {y = 4L}

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list