wiki:LemmaStyleGuide

Lemma code follows a few simple guidelines

  1. Indentation level is four (4) spaces.
  2. Use the one true brace (OTB) style. Since there is more than a single OTB please see the example below
    Real myFunction( const Real& myReal ) {
        if (myReal < PI) {
            return myReal;
        } else {
            return myReal/PI;
        }
    }
    
    The biggest source of confusion is for functions and classes, the first brace remains on the function declaration line.
  3. Line endings in the official repositories are Unix style "\n".
  4. Vim macros are available in the vim directory of the source code.
Last modified 3 months ago Last modified on Jul 24, 2018 5:16:08 AM