www.digitalmars.com         C & C++   DMDScript  

D - enum and version()

reply Vathix <vathix dprogramming.com> writes:
If we could use ; in enum, would it easily allow version()?


enum Foo
{
    a, b, c;

    version(Speshul)
       d = 9, e, f;
    else
       d = 11, e, f;

    g = 40, h, i,
}


-- 
Christopher E. Miller
Mar 17 2004
parent reply "Walter" <walter digitalmars.com> writes:
"Vathix" <vathix dprogramming.com> wrote in message
news:c3a3ir$2ngm$1 digitaldaemon.com...
 If we could use ; in enum, would it easily allow version()?


 enum Foo
 {
     a, b, c;

     version(Speshul)
        d = 9, e, f;
     else
        d = 11, e, f;

     g = 40, h, i,
 }

Currently, that is not allowed.
Mar 26 2004
parent Ant <duitoolkit yahoo.ca> writes:
On Fri, 26 Mar 2004 21:42:04 -0800, Walter wrote:

 
 "Vathix" <vathix dprogramming.com> wrote in message
 news:c3a3ir$2ngm$1 digitaldaemon.com...
 If we could use ; in enum, would it easily allow version()?


 enum Foo
 {
     a, b, c;

     version(Speshul)
        d = 9, e, f;
     else
        d = 11, e, f;

     g = 40, h, i,
 }

Currently, that is not allowed.

Yes, we know that ;) but, is it planed? this is a suggestion. (I was about to post the same suggestion the day (and hour) Vathix posted this) Ant
Mar 26 2004