two questions on enums
Eric
eric at makechip.com
Thu Apr 3 14:51:45 PDT 2014
1). Is there a way to "import" an enum so that you don't need
to qualify each instance with the type name? Something like
java does with its "static import".
2). It seems that you can't use an enum of struct or class type
in a switch statement. This seems inconsistent. Would it make
sense to have like an "uint opOrdinal()" method that would return
a value known at compile time so that class or struct enums
can be used in switch statements?
Thanks,
Eric
More information about the Digitalmars-d-learn
mailing list