13 posts
Posted 28 August 2012 - 01:20 PM
Hi all,
I am looking for a XOR function. I remember seeing one somewhere but the search won't let me search for XOR.
Thank you!
318 posts
Location
Somewhere on the planet called earth
Posted 28 August 2012 - 01:38 PM
while true do
if rs.getInput("right") and rs.getInput("left") then
rs.setOutput("back" false)
elseif rs.getInput("right") and not rs.getInput("left") then
rs.setOutput("back", true")
elseif not rs.getInput("right") and rs.getInput("left") then
rs.setOutput("back", true")
end
end
That might work
13 posts
Posted 28 August 2012 - 10:32 PM
while true do
if rs.getInput("right") and rs.getInput("left") then
rs.setOutput("back" false)
elseif rs.getInput("right") and not rs.getInput("left") then
rs.setOutput("back", true")
elseif not rs.getInput("right") and rs.getInput("left") then
rs.setOutput("back", true")
end
end
That might work
Thanks, but I was more looking for a function, like XOR(a, :D/>/>. Do you know how to do that?
1604 posts
Posted 28 August 2012 - 11:10 PM
13 posts
Posted 29 August 2012 - 12:06 AM