purplepenguin wrote:I was getting all wrapped up with Boolean logic as we have just covered <, >, =, and, or and not operators the OU explained these as Boolean Logic operators. I now see the error is a mathematical one.
Comparison operators (==, >, <, <=, >=, ===, etc, depending on language) are not boolean operators as they can take non boolean operands, but they do always
return a boolean result.
Only the equality operator makes any sense with Boolean operands, and then only if you are comparing two boolean variables (i.e. not literals). (boolvar1 == boolvar2) will return true if, and only if, both variables are true or both variables are false (i.e. the same)
Cases like (boolvar1 == true) are nonsensical as
IF boolvar1 == 1 THEN .....
is equivalent to
IF boolvar1 THEN .....