Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hide won't
Message
From
12/03/2014 15:08:23
 
 
To
12/03/2014 14:31:59
General information
Forum:
Javascript
Category:
JQueryUI
Title:
Miscellaneous
Thread ID:
01596038
Message ID:
01596343
Views:
35
>>we had coding hints to ALWAYS use braces, as the single line might not stay single forever ;-)
>>(and maintainance dev were expected to miss missing curly braces)
>
>Me too. I was also told to always do this:
>
int foo(int x)
>{
>    .
>    .
>    switch (x)
>    {
>        case 4:
>            return -1;
>            break;        // Always include a break in a case statement
>        .
>        .
>        .
>    }
>}
>
>It's simple: some things we were taught by well-meaning people were just plain wrong. :-)

C# won't compile if there isn't a 'break;'
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform