QB45 Forums
Party like you didn't do in 1999.

Programming Talk - View Post
Anything related to programming under the sun

Jofers
ADMIN

Posts: 392
AND is a sounder method
Posted by Jofers, on Aug 16th, 2005
Let's say you want to see if any given bit is raised:
if 1 and &b1 then...
if 2 and &b10 then...
if 4 and &b100 then...

you can just use iif if you need it to be 1 or 0:
print iif(3 and &b100, 1, 0)

Back to Programming Talk

Replies:
There are no replies to this message

Post a reply:







All content copyrighted 2004, All rights reserved.