should this work?

BCS nothing at
Fri Dec 29 13:24:48 PST 2006

void main()
   char[] str = "hello";
   int i = 5;
     case "hello":
       case "goodby":	// case for outer switch in inner switch
       case 1:;

It doesn't because (I assume), it isn't allowed to in C/C++. However 
that is because C has only one type for switches, integer. D doesn't 
have this restriction, array types are just fine. So why not (sanity 
aside*) permit it?

* I can think of no uses for it, but what does that matter.

More information about the Digitalmars-d-learn mailing list