why global immutable string variable cannot be used after "case"?

Tobias Pankrath tobias at pankrath.net
Fri Sep 23 01:38:25 PDT 2011


> If immutable cannot be used, what else can be used to replace #define
> in C?
> 
> Thanks a lot.

immutables are runtime constants. For case you need a 
compile time constant, which you can define with enum.

enum string mycase = "value";


More information about the Digitalmars-d-learn mailing list