switch()

Casper Færgemand" <shorttail at hotmail.com> Casper Færgemand" <shorttail at hotmail.com>
Sun Feb 16 16:22:51 PST 2014


What about new evolved switch statement, called something as to 
not confuse it with C syntax? It could be a simple rewrite thing.

mysteryswitch (some expression) {
   case 1: some statement;
   case 2 .. 4: some other statement;
}

could rewrite to

switch (some expression) {
   case 1: some statement; break;
   case 2: .. case 4: some other statement; break;
   default: break;
}


More information about the Digitalmars-d mailing list