QuakeC Order Of Operation Inquiry
For the example ...
float does_focus_event_occur = KIsNotFocused(k) && Object_Will_Focus_Currently(k); // returns TRUE (?) when part 1 == TRUE and part 2 == FALSE
KIsNotFocused(k) is a macro with parenthesis around it and evaluates to true. Object_Will_Focus_Current(k) is a function and it is returning false
float isnotfocused = KIsNotFocused(k); // TRUE
float willfocus = Object_Will_Focus_Currently(k); // FALSE
So ( true ) && false is certainly false, right? ===> 0 && 1 == 0
Yet I get true!
isnotfocused == true willfocus == false does_focus_event_occur ( true? why?)
I don't get it. Even without short-circuiting -- which QuakeC doesn't have -- 0 & 1 is still zero.
I'm taking a guess here ...
I suspect combining a function return in an if statement with anything else is a "NO".