??? 07/02/07 18:58 Read: times Msg Score: +2 +2 Good Answer/Helpful |
#141421 - operator precedence Responding to: ???'s previous message |
Chris Kelly said:
Andy Peters said:
use parentheses liberally I choose this one section from your post to illustrate a counter-example. If you always "use parentheses liberally" then what happens is that, over time, you begin to forget the rules of operator precedence. Chris, I completely agree with your assertion that you forget the rules of operator precedence. IMHO, that's not a bad thing. Why? Because I do C, VHDL and Verilog and I can't keep track of who's on first and what's on second when I switch between them. Verilog especially will bite you in the ass. While some claim that it's "C-like," it's different enough to cause heartburn and worse. So in the interest of preserving my own sanity, I prefer to avoid statements such as if(a & 0x01 && b & 0x80) { ... }. -a |