On expression GoTo label1[, label2[, ..., [labelN...]]] The statement On-GoTo sends the
program flow to one of several possible destinations based on the
value of a integer expression in the range of 0 - 231. Init: Print "0) Exit Menu" Print "1) Pizza" Print "2) Pasta" Input "Your preference"; p% If p%<0 or p%>2 Then GoTo Init On p% GoTo quit, pizza, pasta pizza: Print "ONE PIZZA FOR YOU" : GoTo quit pasta: Print "PASTA !!!" : GoTo quit quit: End Example 2:
|