I see in the Picaxe manuals where traditional boolean operators such as "and" operate bitwise mathematically on registers, but what about logical operations? Are logical operations available for "and", and "or"?
For example, the following code is acceptable to the Picaxe Editor (14M), and when simulated, if Pin4 and Pin1 are simultaneously set to 1, then the code branches to Motoroff, but there is no branching when Pin4 is set to 0 and Pin0 is set to 1.
How is this code really interpreted?
______________
Start:
If Pin4=1 and Pin1=1 or Pin4=0 and Pin0=1 then
Goto Motoroff EndIf
Goto Start
MotorOff:
Goto Start
_______________
Is it possible to reliably apply logical operators to If/Then statements, and if so, what is the order of execution for logical operators such as "and", and "or"?
Thanks in advance for any help, Odessa.
For example, the following code is acceptable to the Picaxe Editor (14M), and when simulated, if Pin4 and Pin1 are simultaneously set to 1, then the code branches to Motoroff, but there is no branching when Pin4 is set to 0 and Pin0 is set to 1.
How is this code really interpreted?
______________
Start:
If Pin4=1 and Pin1=1 or Pin4=0 and Pin0=1 then
Goto Motoroff EndIf
Goto Start
MotorOff:
Goto Start
_______________
Is it possible to reliably apply logical operators to If/Then statements, and if so, what is the order of execution for logical operators such as "and", and "or"?
Thanks in advance for any help, Odessa.