samedi 20 juin 2015

Coding standard - whether should I add parenthese after if - only one line

I have a question about whether should I add parenthese after 'if', if I only have one line.

if(a == b) c = 1;

or

if(a == b){
    c = 1;
}

or

if(a == b)
{
   c = 1;
}

which one is what you usually use?

Aucun commentaire:

Enregistrer un commentaire