I am trying to evaluate if my two variables each match one of multiple values in an if statement. I'm trying:
if ( ( variable1 == A || B ) && ( variable2 == C || D ) )
Error: use of logical '||' with constant operand.
I managed to fix it (below) but this seems tedious and repetitive and I am wondering if there is a simpler fix.
if ( ( variable1 == A || variable1 == B ) && ( variable2 == C || variable2 == D ) )
Thanks!