Messages in this thread | | | Date | Tue, 05 Sep 2006 18:40:27 +0200 | From | Stefan Richter <> | Subject | Re: CodingStyle |
| |
Pavel Machek wrote: > +Avoid extra spaces around ! operator, and do not place spaces around (s.
How about:
Avoid extra spaces after the ! operator. Do not place spaces around parentheses.
Because "foo && !bar" is certainly OK.
Or more draconian for the former and less so for the latter rule:
Do not put whitespace between any of the unary operators and their operand.
It is usually unnecessary to have whitespace around parentheses as part of expressions, around brackets, or around the operators . and ->.
Rule 1 certainly applies likewise to ++, --, unary +, unary -, !, ~, (typecast), unary *, unary &, sizeof.
Rule 2 applies to all of ( ), [ ], ., ->, except where line breaks and indentation warrant whitespace, or where whitespace helps to read expressions with more levels of braces. Although the latter should be avoided anyway. -- Stefan Richter -=====-=-==- =--= --=-= http://arcgraph.de/sr/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |