トピック
受付中
MikeATD corb1477

Button true and false

Can someone please tell me how i can set these buutons to be true or false? Clarification: I need these If...Then statements to see if the button is pressed then... or vise-versa
0そうだね
プレイ済み
返信[1]
親投稿
Hanzo rzsense
Not "0 or 1" but "0 or NOT 0". You should write IF(BT AND 16)!=0 THEN in case of @BUTTONTRUE. 16 stands for A button btw. (You can replace this 16 with #A.)
0そうだね
未プレイ
返信[2]
親投稿
MikeATD corb1477
Thanks. Another question: is this the only way?
0そうだね
プレイ済み
返信[3]
親投稿
Hanzo rzsense
There are some methods as follows. Ex. 1 IF(BT AND #A)!=0 THEN GOSUB @BUTTONTRUE ELSE GOSUB @BUTTONFALSE Ex. 2 F=((BT AND #A)!=0) GOSUB "@BUTTON"+"TRUE"*F+"FALSE"*!F
0そうだね
未プレイ
返信[4]
親投稿
MikeATD corb1477
Thank you. Final question: What are these bits that it says in the photo like b0-b12? It says that the corresponding bits are 0 and 1.
0そうだね
プレイ済み
返信[5]
親投稿
Hanzo rzsense
b0-b12 is 13-digit binary number. I've made a sample program to explain binary number to you. Could you download N3F5DXN3 and run EX_BIN2DEC in the downloaded folder?
1そうだね
未プレイ