jleesaxon Posted June 2, 2014 Share Posted June 2, 2014 (edited) I'm confused about the interaction of and/or operators and parentheses. My understanding is that && is higher priority than || which is priority than AND, so {$A && $B && $C || $D && $E} means "(A and B and C) or (D and E)", while {$A AND $B && $C || $D && $E means "A and ((B and C) or (D and E))." But aren't parenthesis even higher priority than &&, meaning that {$A && ($B && $C || $D && $E)} also means "A and ((B and C) or (D and E))"? Doesn't that mean that {$A AND ($B && $C || $D && $E)} is redundant? Edited June 2, 2014 by jleesaxon (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted June 2, 2014 Share Posted June 2, 2014 I believe parenthesis are not redundant in this case as you want to have A and b&c OR d&e, seems logical to me Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now