Linux Today: Linux News On Internet Time.

zez.org: Coding Standards - Part 2 - Basic conventions

Dec 02, 2000, 15:38 (0 Talkback[s])
(Other stories by Gunnstein Lye)

[ Thanks to Paul K Egell-Johnsen for this link. ]

"Macros and other # commands are to be avoided. Exceptions are #include and the necessary #ifndef/#define/#endif in header files. Macros can be used when there are good reasons to do so, though."

"Use 4 character indentation, this is commonly used and allows for easy recognition of the indentation level. Use spaces in stead of TABs, to assure the code looks the same everywhere."

"Put begin and end brackets {} on the same column, and on the same column as the statement that "owns" the brackets."

Complete Story

Related Stories: