BAM: [new] _MAPSET and _MAPGET
#2
An example use case:

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

  on _mapget(selection$) 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
Reply


Messages In This Thread
BAM: [new] _MAPSET and _MAPGET - by CharlieJV - 03-11-2023, 06:46 PM
RE: BAM: [new] _MAPSET and _MAPGET - by CharlieJV - 03-11-2023, 11:18 PM
RE: BAM: [new] _MAPSET and _MAPGET - by Petr - 03-12-2023, 10:41 AM
RE: BAM: [new] _MAPSET and _MAPGET - by CharlieJV - 03-12-2023, 04:16 PM
RE: BAM: [new] _MAPSET and _MAPGET - by CharlieJV - 03-12-2023, 04:28 PM
RE: BAM: [new] _MAPSET and _MAPGET - by Petr - 03-12-2023, 05:29 PM
RE: BAM: [new] _MAPSET and _MAPGET - by CharlieJV - 03-12-2023, 06:28 PM
RE: BAM: [new] _MAPSET and _MAPGET - by Petr - 03-12-2023, 06:55 PM
RE: BAM: [new] _MAPSET and _MAPGET - by CharlieJV - 03-12-2023, 08:19 PM



Users browsing this thread: 5 Guest(s)