r/Basic • u/CharlieJV13 • Mar 11 '23
BASIC Anywhere Machine: 🆕 _MAPSET and _MAPGET
https://basicanywheremachine-news.blogspot.com/2023/03/mapset-and-mapget.html
6
Upvotes
r/Basic • u/CharlieJV13 • Mar 11 '23
View all comments
2
u/CharlieJV13 Mar 11 '23 edited Mar 11 '23
Sample use case:
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 getselectionon_mapget(selection$) gosub handle_A, handle_B, handle_Cgoto getselectionendSUBROUTINES:handle_A:print "stuff to do for selection A"RETURNhandle_B:print "stuff to do for selection B"RETURNhandle_C:print "stuff to do for selection C"RETURN