TDPL enum greet = "Hello";

Paolo Invernizzi arathorn at fastwebnet.it
Sun Aug 8 08:08:53 PDT 2010


Hi all,
On page 273 of TDPL, we have:

enum euler = 2.78;
euler = 2.73 // Error! Cannot modify enum value!

But with D 2.047 I can do:

enum greet = "Hello";
greet = "Ciao"; // Ok?

So the question is, enumerated values are constant?
Cheers, Paolo


More information about the Digitalmars-d-learn mailing list