03-12-2023, 10:41 AM
Something as this already exists:
Code: (Select All)
INIT:
' _initaudio
' _mapset("A", 1)
' _mapset("B", 2)
' _mapset("C", 3)
'MAIN_PROGRAM:
getselection:
Print "Press one of the following keys: A B C"
Let selection$ = UCase$(Input$(1))
If selection$ < "A" Or selection$ > "C" Then Beep: GoTo getselection
Selected = Abs(64 - Asc(selection$))
Print Selected
' on _mapget(selection$) gosub handle_A, handle_B, handle_C
On Selected GOSUB Handle_A, Handle_B, Handle_c
GoTo getselection
End
SUBROUTINES:
Handle_A:
Print "stuff to do for selection A"
Return
Handle_B:
Print "stuff to do for selection B"
Return
Handle_c:
Print "stuff to do for selection C"
Return