PhobosWatch: manifest => enum
Leandro Lucarella
llucax at gmail.com
Fri Dec 28 16:29:01 PST 2007
Derek Parnell, el 29 de diciembre a las 08:43 me escribiste:
> 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}
With this example, I guess Walter will say:
enum {
x = 3,
y = 4L
}
=)
But the original question still remains, will be enum x = 3; supported?
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
You can do better than me. You could throw a dart out the window and hit
someone better than me. I'm no good!
-- George Constanza
More information about the Digitalmars-d
mailing list