On 13 May 2015 at 07:28, Bálint Réczey <[email protected]> wrote:
> 2015-05-13 0:26 GMT+02:00 Guy Harris <[email protected]>: > > > > On May 12, 2015, at 3:13 PM, Evan Huus <[email protected]> wrote: > > > >> Argh, one of these days I will learn to just put parentheses in rather > >> than taking guesses at C operator precedence :( > > > > Yeah, the rule I've found works best for me is "if you aren't certain, > throw parentheses at it". > Yes, in this case parentheses are a must. > I also llike putting them when the reader may not guess the precedence > correctly easily. This reader can be myself later ;-). > I have a colleague who for reasons only known to himself is violently against "unnecessary" parentheses, so I always put in even more just for him. My rule is to parenthesise wherever multiple operators appear in an expression. Even more important where the team is working in multiple programming languages with different precedence rules. -- Graham Bloice
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
