The PBP help file for the AND statement says.....
Be sure to use parenthesis to tell PICBasic the exact order you want the operations to be performed.....
That means your original statement should look like.....
IF (X=1) OR (X=2) THEN....
HTH
BrianT
The PBP help file for the AND statement says.....
Be sure to use parenthesis to tell PICBasic the exact order you want the operations to be performed.....
That means your original statement should look like.....
IF (X=1) OR (X=2) THEN....
HTH
BrianT
Thanks guys for the help. Sometimes, the answer is right in front of you, but you're so stuck on seeing it the other way, that your mind doesn't realize it. The way I wrote it sounded so logical, but I know the chip isn't that smart, hence, why we have to tell it EXACTLY what to do or else it won't do it.
Before I could get an answer, I rewrote it into separate IF statements. Seems to flow that way too. Thanks again.
Tony
Bookmarks