mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
codingStyleGuide: Improved formatting
Resolves bug-report http://bugs.openfoam.org/view.php?id=2194
This commit is contained in:
@ -332,8 +332,8 @@
|
|||||||
a < b, a > b, a >= b, a <= b
|
a < b, a > b, a >= b, a <= b
|
||||||
a || b, a && b
|
a || b, a && b
|
||||||
#+end_src
|
#+end_src
|
||||||
+ Splitting formulae over several lines
|
|
||||||
|
|
||||||
|
+ Splitting formulae over several lines:
|
||||||
Split and indent as per "splitting long lines at an ="
|
Split and indent as per "splitting long lines at an ="
|
||||||
with the operator on the lower line. Align operator so that first
|
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.
|
variable, function or bracket on the next line is 4 spaces indented i.e.
|
||||||
@ -344,7 +344,6 @@
|
|||||||
*(k + t);
|
*(k + t);
|
||||||
#+end_src
|
#+end_src
|
||||||
This is sometimes more legible when surrounded by extra parentheses:
|
This is sometimes more legible when surrounded by extra parentheses:
|
||||||
|
|
||||||
#+begin_src C++
|
#+begin_src C++
|
||||||
variableName =
|
variableName =
|
||||||
(
|
(
|
||||||
@ -353,8 +352,8 @@
|
|||||||
*(k + t)
|
*(k + t)
|
||||||
);
|
);
|
||||||
#+end_src
|
#+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
|
outdent the operator so that the next variable to test is aligned with
|
||||||
the four space indentation, i.e.
|
the four space indentation, i.e.
|
||||||
#+begin_src C++
|
#+begin_src C++
|
||||||
|
|||||||
Reference in New Issue
Block a user