Picaxe Blockly question

JSDL

Senior Member
Just wondering if there is a way in Blockly to use multiple logical operators in an IF Statement to check 2 inputs at once. Am I missing something? I'm looking to do something like:

Code:
if pinC.1=1 and pinC.2=0 then
...code here
else
...code here
end if
 

hippy

Technical Support
Staff member
IF AND/OR for inputs is not currently supported in Blockly.

You can achieve the same by calculating the conditional result in a variable and then testing that ...

varA = pinC.2 ^ 1 & pinC.1
If varA = 1 Then
 

Technical

Technical Support
Staff member
You can do this to also get the 'else' case, obviously the top test could be replaced with something more useful if you wanted.

CaptureInputs.PNG
 
Top