Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 17 and Version 18 of code/C++_styleguide


Ignore:
Timestamp:
Sep 19, 2008, 1:52:21 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/C++_styleguide

    v17 v18  
    7171Place machine-dependent code in a special file so that it may be easily located when porting code from one machine to another.
    7272
    73 === 80 Columns tops ===
    74 If you can help it, try to keep your code within 80 character columns, 120 tops otherwise. [[br]]
    75 ''Comment: 80 columns is a common dimension for editors, terminal emulators, printers and debuggers, and files that are shared between several people should keep within these constraints. It improves readability when unintentional line breaks are avoided when passing a file between programmers.''
    76 
    7773=== Include Guard ===
    7874Header files must contain an include guard.
     
    9288/**
    9389@file
    94 @brief
    95     A brief description.
    96     More description.
     90@brief A brief description.
     91
     92More description...
    9793*/
    9894}}}
     
    301297while (!done)
    302298{
    303   doSomething();
    304   done = moreToDo();
     299    doSomething();
     300    done = moreToDo();
    305301}
    306302}}}
     
    311307class SomeClass : public BaseClass
    312308{
    313 public:
    314   void functionBla();
    315 
    316 protected:
    317   ...
    318 
    319 private:
    320   ...
     309    public:
     310        void functionBla();
     311
     312    protected:
     313        ...
     314
     315    private:
     316        ...
    321317};
    322318}}}
     
    328324void functionBla()
    329325{
    330   ...
     326    ...
    331327}
    332328}}}
     
    337333if (condition)
    338334{
    339   ...
     335    ...
    340336}
    341337else