Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hide won't
Message
De
12/03/2014 15:08:23
 
 
À
12/03/2014 14:31:59
Information générale
Forum:
Javascript
Catégorie:
JQueryUI
Titre:
Divers
Thread ID:
01596038
Message ID:
01596343
Vues:
44
>>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;'
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform