03-12-2023, 04:28 PM
(03-12-2023, 04:16 PM)CharlieJV Wrote: Mine was a ridiculous use case scenario.
I am not particularly good at inventing hypothetical examples.
Maybe this is better:
Code: (Select All)INIT:
_initaudio
_mapset("CARROT", 1)
_mapset("CORN", 2)
_mapset("POTATO", 3)
MAIN_PROGRAM:
getselection:
input "Search for recipes: enter one ingredient:", selection$
selection$ = ucase$(selection$)
if _mapget(selection$) = "" then beep : print "sorry, no recipes for " + selection$ : goto getselection
on _mapget(selection$) gosub CARROT, CORN, POTATO
goto getselection
end
SUBROUTINES:
CARROT:
print "setup special processing for carrot-related recipes and info"
RETURN
CORN:
print "setup special processing for corn-related recipes and info"
RETURN
POTATO:
print "setup special processing for potato-relatd recipes and info"
RETURN
Hmm. That last sample would have been better with "ORANGE", "CARROT", "BEEF". Just to highlight that the processing might be pretty different for fruit vs veggies vs meat.