Author: istruewing
Date: 2006-06-12 13:09:24 +0200 (Mon, 12 Jun 2006)
New Revision: 2352
Log:
Changed coding guidelines to explain that unary operators should not have space around
them.
Modified:
trunk/internals/internals.xml
Modified: trunk/internals/internals.xml
===================================================================
--- trunk/internals/internals.xml 2006-06-11 23:14:39 UTC (rev 2351)
+++ trunk/internals/internals.xml 2006-06-12 11:09:24 UTC (rev 2352)
@@ -2339,19 +2339,20 @@
<listitem>
<para>
- Put spaces both before and after comparison operators
- ('>' '==' '>=' etc.), arithmetic operators ('+' etc.),
- and Boolean operators ('||' etc.). Do not put spaces around
- '++' or '->'. Do not put space after '*' when '*'
- introduces a pointer. Do not put spaces after '('. Put one
- space after ')' if it ends a condition, but not if it ends a
- list of function arguments. For example:
+ Put spaces both before and after binary comparison operators
+ ('>' '==' '>=' etc.), binary arithmetic operators ('+'
+ etc.), and binary Boolean operators ('||' etc.). Do not put
+ spaces around unary operators like '!', '++' or '->'. Do
+ not put space after '*' when '*' introduces a pointer. Do
+ not put spaces after '('. Put one space after ')' if it ends
+ a condition, but not if it ends a list of function
+ arguments. For example:
</para>
<programlisting>
int *var;
-if (x == y + 2)
+if ((x == y + 2) > !is_signed)
function_call();
</programlisting>
</listitem>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2352 - trunk/internals | istruewing | 12 Jun |