Cpp Coding Standards/FORMAT

From Apache OpenOffice Wiki
< Cpp Coding Standards
Revision as of 12:05, 28 November 2006 by Np (Talk | contribs)

Jump to: navigation, search

Code Format

How to format the code generally should not be governed by rules. Here are only a few things that are necessary for correct compiler behaviour or increase code readability significantly.


Summary

NewlineEof

Always conclude your source file with a newline character.

SourceCharSet

Don't use non-ASCII characters.

Exception: Use UTF8 encoding in resource files.

NoCppComments

Don't use C++ comments in C code or C headers.

Indent4

Indentation is 4 spaces.

NoTabs

Use spaces, not tabs.


Explanations


Personal tools