summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/manual/style.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/manual/style.txt b/doc/manual/style.txt
index b9a7612f..0fe33876 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