No more fall through in case statement?

Mike vertex at gmx.at
Thu Jan 3 07:46:28 PST 2008


On Thu, 03 Jan 2008 12:03:08 +0100, Janice Caron <caron800 at googlemail.com>  
wrote:

> For example:
>
>     case 1:
>         /*...*/
>         /* falls through */
>     case 2:
>         /*...*/
>        break;
>     case 3
>     {
>         /*...*/
>     }
>         /* does not fall through */
>
> Existing syntax will still work, so that C++ programmers won't get
> confused. To get no-fall-through behaviour, you'd have to replace the
> colon with an opening curly brace (and remember the closing brace).
> Everyone's happy. (Maybe?)

I've posted this exact same idea a long time ago. It's just so obviously  
how it should be.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list