About switch case statements...

bearophile bearophileHUGS at lycos.com
Sun Nov 15 12:17:17 PST 2009


Don:

> I consider that fallthrough requires a non-empty statement. IE,
> case A:
> case B:
> case C:
>       dosomething();
>       break;
> 
> is not a real fallthrough; those would always be allowed.

In D this is the right way to write that:

case A, B, C:
    dosomething();
    break;

Bye,
bearophile



More information about the Digitalmars-d mailing list