diff options
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/style.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/manual/style.txt b/doc/manual/style.txt index b9a7612..0fe3387 100644 --- a/doc/manual/style.txt +++ b/doc/manual/style.txt @@ -107,6 +107,20 @@ int f(int x1, int x2) ... } @endcode +- Separate assignment and logical test statements. In other words, you +should write statements like the following: +@code +// separate statements should be preferred +result = foo(); +if (ERROR_OK != result) + ... +@endcode +More directly, do @b not combine these kinds of statements: +@code +// Combined statements should be avoided +if (ERROR_OK != (result = foo())) + return result; +@endcode */ /** @page styledoxygen Doxygen Style Guide |