Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Like toolic, I work on the principle of "when in doubt, parenthesize." I've also dealt with optimizing compilers that would handle something like
differently from
in that it would not recognize i + j as constant in the innermost loop in the first fragment, but would in the second. There are also cases where I've needed to force a specific order of operations to preclude under or overflow. I also won't rule out the possibility that, unlike the compiler, I can get confused about logical tests that have multiple and's, or's, and not's; using (perhaps superfluous) parentheses will reduce my confusion. In reply to Re: Burned by precedence rules
by swampyankee
|
|