Sorry - just answered my own question


sorry just answered my own question but I can't figure out how to delete it


Hi @brendan_whiting

When dealing with the && operator it is important to remember that all expressions being evaluated must = true in order for the final expression to be true, whenever a single expression is NOT true (false) then the whole expression is false.

A brief example follows

if (true && true) = true;
if (true && false) = false;
if (false && true) = false;
if (false && false) = false;

With that above in mind lets look at your example:

if (3 <= 3 && !(true || true))

stepping through this we see it says evaluates to (true && false), where the not operator is used it reverses true to false, therefore you end result is false.


Oh you updated your answer hey, not to worry, I think to delete a post, you should hopefully have a small symbol at the bottom of your post next to the reply link that looks like a rubbish bin try clicking that :), otherwise you can just mark it as solved and hopefully it will stay for reference in case someone else needs help.