Actions

EmSys

CCoding Style - Use a consistent indentation and brace style2

From EdWiki

Use a consistent indentation and brace style ...

  • The indentation is misleading, since the else is actually attached to the line if( day > 29 ) and the code is wrong.
  • When one if immediately follows another, always use braces.
  • If you work on a program you didn’t write, preserve the style you find there. When you make a change, don’t use your style even though you prefer it. The program’s consistency is more important than your own, because it makes life easier for those who follow.