Difference between revisions of "Cpp Coding Standards/FORMAT"
From Apache OpenOffice Wiki
m |
m (Cpp Coding Standards/Topics/FORMAT moved to Cpp Coding Standards/Code Format: Improve Cpp_Coding_Standards structure.) |
(No difference)
|
Revision as of 12:05, 28 November 2006
Contents
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.