Difference between revisions of "Cpp Coding Standards/FORMAT"
From Apache OpenOffice Wiki
m (Cpp Coding Standards/Code Format moved to Cpp Coding Standards/FORMAT: consistency) |
|
(No difference)
|
Revision as of 14:01, 22 May 2007
Topic-Id: 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.
Contents
Summary
Newline at End of File (Eof)
Always conclude your source file with a newline character.
Source Code Character Set (CharSet)
Don't use non-ASCII characters.
Exception: Use UTF8 encoding in resource files.
No Cpp Comments in C Code (CppComm)
Don't use C++ comments in C code or C headers.
Indentation (Indent)
Indentation is 4 spaces.
No Tabs (NoTabs)
Use spaces, not tabs.