#1✎ 34KHypnoI just found an amazing way to do multi-button input. Try this:
#2✎ 404hakkeRNGHiddenEaster EggsQSP Contest 2 Contest ParticipantI participated in the second SmileBASIC Source QSP Contest!Expert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthYou can also do multi-button input using the AND operator:
'Check L and R
IF BUTTON(1) AND (#L OR #R) THEN PRINT "L and R!"
This works because the return value of BUTTON is a bitmask, that means every button has a single bit in the return value. The AND operator will return all the shared bits in both operands (&b1001 AND &b1011 == &b1001), and OR will return all the bits in both (&b1001 OR &b0110 == &b1111)
#3✎ 1357randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthSecond YearMy account is over 2 years oldWebsiteForum LeaderHiddenAchievementsTbh, you don't need to do exactly
you can do just
BIN$ just makes it binary. It's what you put in () after BUTTON that effects that. Look at the help page for button.