switch()

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Feb 21 11:32:43 PST 2014


On 2/16/14, Manu <turkeyman at gmail.com> wrote:
> requiring an empty 'default: break;' line at the end is annoying and noisy.

Guys, I keep seeing this line being mentioned but you don't actually
have to type "break":

-----
void main()
{
    int x;
    switch (x)
    {
        case 1:
            break;

        // this works fine
        default:
    }
}
-----


More information about the Digitalmars-d mailing list