PhobosWatch: manifest => enum
Walter Bright
newshound1 at digitalmars.com
Fri Dec 28 12:33:37 PST 2007
Steven Schveighoffer wrote:
> That brings up a couple of questions. Under the new regime, what happens
> with this code:
>
> enum {one, two}
No change here, one and two are ints with values 0 and 1.
> enum : long {one, two}
No change here, one and two are longs with values 0 and 1.
> enum : float {one, two}
Change here, floats are now allowed as the base type, one and two are
floats with values 0.0f and 1.0f.
> enum
> {
> float one = 1.0,
> two
> }
Change here, one is float of value 1.0f, two is float of value 2.0f.
> and will enums in curly braces that are manifest constants have to be
> specified with semicolons or commas?
commas.
More information about the Digitalmars-d
mailing list