PhobosWatch: manifest => enum
Pedro Ferreira
arad at asd.ea
Fri Dec 28 14:17:48 PST 2007
Derek Parnell Wrote:
> 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
You'll be able to do
> enum x = 3;
> enum y = 4L;
It's here somewhere in this thread already.
More information about the Digitalmars-d
mailing list