on goto -- jump to one of multiple gosub-targets
on a gosub foo,bar,baz
The on gosub statement uses its numeric argument (the one between on and gosub) to select an element from the list of labels, which follows after the gosub-keyword: If the number is 1, the program does a gosub to the first label; if the number is 2, to the second and, so on. if the number is zero or less, the program continues at the position of the first label; if the number is larger than the total count of labels, the execution continues at the position of the last label; i.e. the first and last label in the list constitute some kind of fallback-slot.
Note, that the on gosub-command can no longer be considered state of the art; people (not me!) may even start to mock you, if you use it.
print "Please enter a number between 1 and 3: "
input "Your choice " a
on a gosub bad,one,two,three,bad
print "No. Please between 1 and 3"
Note, how invalid input (a number less than 1, or larger than 3) is automatically detected.
goto, on gosub