I used to do it in C but in D it's giving this compile error message:

switch case fallthrough - 'use goto case;' if intended

Here's the code:

switch(value) {
// alof of cases here
// ...
white: // regular label
                        case 'a': case 'c':
                        case 'd': case 'k':
                                do_something();
                                break;
 case 'e':
       do_something2();
        break;
 default: assert(0);
}

How is it fall through if there's a break? does D switch differ from C in any way?

Reply via email to