For Example:
/* These all return TRUE (1) */ if (4 && 5) return(); i=3; j=2; return( i && j);The expression is evaluated 'Left to Right' If any part of the expression returns ZERO - The evaluation ends.
THIS CAN CAUSE SERIOUS PROBLEMS.
For example:
k=0; i=3; j=2; if ( i-i && j++) k=1The left side (i-i) resolves to 0, so j is not incremented and k is not changed.
SO WATCH YOUR BACK....
k=0; i=3; j=2; if ( i+i && j++) k=1What are j and k going to be when this code is executed?????
!4 /* Returns 0 */ !-4 /* Returns 0 */ !1 /* Returns 0 */ !0 /* Returns 1 */
Top | Master Index | Keywords | Functions |