Mail Archives: djgpp/1997/05/18/15:17:38
A. Sinan Unur <asu1 AT cornell DOT edu> skrev i inlägg
<337E0EE4 DOT 1DB7F3F2 AT cornell DOT edu>...
> > if ((mouse_b & 1) & (mouse_x > fx) & (mouse_x < lx) & (mouse_y > fy)
& (mouse_y < ly))
>
> no. the problem is that you are using bitwise and rather than logical
> and. replace the &'s with &&'s.
In this particular case it doesn't make any difference, as all the operands
will have values of either 1 or 0, and the precedence difference is taken
care of by the parentheses.
It would be better to use logical ands, but it's not the problem.
- Raw text -