www.digitalmars.com         C & C++   DMDScript  

D - BUG enum

reply tintor <tintor_member pathlink.com> writes:
enum A {a,b,c}

void main()
{
A m = c;
}

This cannot compile.
Compiler complaints that C isn't defined.
Oct 16 2003
next sibling parent Benji Smith <dlanguage xxagg.com> writes:
On Thu, 16 Oct 2003 15:38:57 +0000 (UTC), tintor
<tintor_member pathlink.com> wrote:

enum A {a,b,c}

void main()
{
A m = c;
}

This cannot compile.
Compiler complaints that C isn't defined.
Use "A.c" instead of just "c". --Benji
Oct 16 2003
prev sibling parent Patrick Down <Patrick_member pathlink.com> writes:
In article <bmme2h$l26$1 digitaldaemon.com>, tintor says...
enum A {a,b,c}

void main()
{
A m = c;
}

This cannot compile.
Compiler complaints that C isn't defined.
Try this. enum A {a,b,c} void main() { A m = A.c; }
Oct 16 2003