Forum Moderators: coopster
if ($x & $z)
{
}
(x$, $z are integers)
I understand that's a bitwise and what do they do, but I don't understand why they are not being compared to another variable!? This look like the kind of C++ stuff that drove me crazy ...
So, to what is that equivalent to? I mean, which other syntax to get the same effect?
So what are you trying to achieve with that if? It's not a comparison. You will get 0 or!0
2 & 1 = 0 (10b & 01b = 00b)
2 & 3 = 2 (10b & 11b = 10b)
Are you sure that this is the problem? Maybe it lays somewhere in the logic?
Write more
Best regards
Michal Cibor