Actions

EmSys

CCoding Style - Use a consistent indentation and brace style

From EdWiki

Use a consistent indentation and brace style

Indentation shows structure, but which indentation style is best?. Pick one style, and use it consistently.

If( month == FEB ) {
    if( year%4 == 0 )
        if( day > 29 )
    else 		
    if( day > 28 )
	legal = FALSE;
}			
 
if( month == FEB ) {
    if( year%4 == 0 ) {
        if( day > 29 )
            legal = FALSE:
        } else {
            if( day > 28 )
                legal = FALSE;
        }
    }
}