Help on Goto
I really appreciate help to do this in spin,
·· Case K==$40
········ On Btn goto Btn1,Btn2,Btn3......Btnn
For each K, there is a Btn range from 0....N
·· Case K==$40
········ On Btn goto Btn1,Btn2,Btn3......Btnn
For each K, there is a Btn range from 0....N

Comments
case k
·· $40 : case Btn
··············· Btn1 : K == $40 and Btn == Btn
················Btn2 :
··············· Btn3 :
·· other :· do other stuff if K <> $40
somthing·like this nested case if your looking for 2 things ,irst k = $40 and then which button ?
of course you could use a if statment for the outside case if your only looking for $40 before checking for btn states
dan
Table byte 1 ' number of entries byte $40, 5, 5, 6, 7, 8, 9You'd have a whole bunch of such entries, search them with a little routine:
PRI search(K,Btn) | i, p p := 1 repeat i from 1 to Table[noparse][[/noparse]0] if K == Table[noparse][[/noparse]p] return Table[noparse][[/noparse]p+1+Btn] else p += Table[noparse][[/noparse]p+1] + 2 return 0You could add range checking on the value of Btn in the line after the "if". You could substitute some other default action if K isn't in the table. You'd follow a call to this with a CASE statement for the actions
CASE search(Kvalue,BtnValue) 0: ' default 5: ' K of $40, Btn1 6: ' K of $40, Btn2 .... 9: ' K of $40, Btn5