? Logical XOR ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Creep into the Halloween / Horror Programming Contest (Deadline Extended)

Logical XOR

SB has logical NOT, AND, and OR (!, &&, ||), but not XOR. However, you can just use:!(A)!=!(B)
Author
12Me21
Updated
Rating
2 votes
Categories
Keywords
  • XOR
4 Comment(s) DizzyDude DizzyDude Video Games I like to play video games! Hobbies Night Person I like the quiet night and sleep late. Express Yourself Avatar Taboo I didn't change my avatar for 180 days Website helpful [sorta] Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself I just need autoEnable% = autoEnable% XOR (getButton% AND #Y) So it should work just fine :) EDIT: Might do it another way I just realized, haha. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS You will neeed parentheses if you are using more than just a single number/variable since ! Comes first in th order of operations Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself Thanks! This will be very useful, I needed something like this for a toggle option.