From 8f12b3597632f674987b1f11c65d2f3f209d5224 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Sat, 20 Aug 2016 09:33:11 +0100 Subject: [PATCH] codingStyleGuide: Improved formatting Resolves bug-report http://bugs.openfoam.org/view.php?id=2194 --- doc/codingStyleGuide.org | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/codingStyleGuide.org b/doc/codingStyleGuide.org index 2b1a0e0251..b3a80ede2c 100644 --- a/doc/codingStyleGuide.org +++ b/doc/codingStyleGuide.org @@ -332,8 +332,8 @@ a < b, a > b, a >= b, a <= b a || b, a && b #+end_src - + Splitting formulae over several lines + + Splitting formulae over several lines: Split and indent as per "splitting long lines at an =" with the operator on the lower line. Align operator so that first variable, function or bracket on the next line is 4 spaces indented i.e. @@ -344,7 +344,6 @@ *(k + t); #+end_src This is sometimes more legible when surrounded by extra parentheses: - #+begin_src C++ variableName = ( @@ -353,8 +352,8 @@ *(k + t) ); #+end_src - + Splitting logical tests over several lines + + Splitting logical tests over several lines: outdent the operator so that the next variable to test is aligned with the four space indentation, i.e. #+begin_src C++ -- GitLab