Shop OBEX P1 Docs P2 Docs Learn Events
Can't logical AND (&) 2 bits together? — Parallax Forums

Can't logical AND (&) 2 bits together?

T'SaavikT'Saavik Posts: 60
edited 2007-03-17 14:41 in General Discussion
Was trying to clean my code up a bit, and i ran into this odd problem.
I was suprised not to find the answer in the operators section of sx/b help file.
This feels like it has a very simple answer that will make me feel really...simple [noparse]:)[/noparse]
Here is a snip

ir_in_left     VAR    Bit
ir_in_right    VAR    Bit
ir_in_center   VAR    Bit

IR_IN_CENTER = IR_IN_LEFT & IR_IN_RIGHT      'sensor is 0v for detect so 0 AND 0= 0 = yes




I get this error when i try to compile:
sx/b said...

UNKNOWN COMMAND "LET"

Full Code here be afraid, its a work in progress. And my first work at that.

Comments

Sign In or Register to comment.