Using a conditional statement with two 'not equals' not returning anticipated result.
I am trying to write the logic that executes only if neither of two variables do NOT equal 1.
I thought it would be as simple as combining two "not equal" statements with an OR.
For example, I think the following code is correct, but it does not work as anticipated - ie I think it should not execute:
== code ==
var failMode1: int = 1;
var failMode2: int = 0;
if (failMode1 != 1 || failMode2 != 1) {
trace("this should not execute")
}
== end code ==
I know I could swap the statements around to make it work (ie use ==) but I'd like to understand what is happening. Any help/explanation would be appriciated.
