??? 07/03/07 14:12 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#141447 - OK, is this better ? Responding to: ???'s previous message |
I said:
"Depending the precedencees instead of using parantheses is just one more way to make C unreadable." Christoph replied: .. religiously following that one MISRA-C rule about not placing any dependence on C operator precedence is one of the fastest ways of turning legible code into a perfect mess. (Hint: Lots of things in C are operators - array accesses "[]", member accesses ".", member accesses from pointers "->", address-of "&", pointer dereference "*", unary plus and minus, assignments, and so on, are all operators that do have a place in the precedence table.) OK, is this better ? "Depending the precedencees beyond the totally obvious instead of using parantheses is just one more way to make C unreadable." for instance Ralph = George[(Phil +1)] - is almost abuse of () but Ralph = George +7 /5 -3 *Phil; - ia abuse of 'precedence knowledge' Erik |