Menus, Labels, and Goto commands
By: Stephen Watson

In TI-BASIC programming, menus, labels, and Goto commands play a very important role. Labels and Goto commands are in many programs. That’s why it’s a good idea to know about these things.

LABELS

To make a label, the basic layout is like this:

:Lbl LABEL 
:Some commands/loops 

Where I wrote LABEL is where you choose a label name. You CAN NOT make a label more than two characters long! You CAN use either numerical figures (0-9, 00-99), alphabetic figures (A-Z, AA-ZZ), or you can use alphanumeric figures (A-Z, AA-ZZ & 0-9, 00-99 Ex: Lbl C2)

Next up, menus!

MENUS

To make a menu, the basic layout is like this:

:Menu("YOUR TITLE","CHOICE ONE",LABEL,"CHOICE TWO",DIFFERENT LABEL) 
Note: You can go up to seven different choices

Where I put "YOUR TITLE" is where you put what you want the menu to say. Where I put "CHOICE ONE" and "CHOICE TWO" is where you put what the choices for the menu should be. Now, where I put LABEL and DIFFERENT LABEL is where you put which label the user goes to after selecting a certain choice. If you made the menu this:

:Menu("CHOOSE ONE:","PLAY",A,"QUIT",B) 

The screen would look like this:

Now, if the user chose PLAY, he/she would go to Label A. If the user chose QUIT, he/she would go to Label B. Understand? Another thing to point out for Menus is that you NEVER, EVER use an if-then statement to tell if the user chose something! For the different choices, you would write the different Labels for A and B. You also never make one label the same as the other(s) unless you mean for two or more choices to go to the same label.

Next up, Goto commands!

GOTO COMMANDS

To make a Goto command, the basic layout is like this:

:Some commands/loops/label(s) 
:Goto LABEL 

Where I wrote LABEL is where you choose where to make the Goto command take the program. Example:

:Lbl A 
:Disp "Hello!","","" 
:Goto A 

That program would go forever because it’s at Label A and it just keeps going to itself. Another way to do that (make a program/loop go forever or until a specified point) is to make a While loop (Discussed in a different tutorial).

I hope that my tutorial helped you out a bit! If you need more help, look to more tutorials on calc.org.