Section 2.1---Lbl's and Goto's
Section 2.1---Lbl's and Goto's

Back to Home

The Lbl command stands for Label. You use these to label certain parts of your program. Then, you use the Goto command to go to these labels. It works like this:
Lbl MM
:Input "1,2?",A
:If A=1
:Goto EF
:If A=2
:Goto YU
:Lbl EF
:Disp "You entered 1"
:Stop
:Lbl YU
:Disp "You entered 2"
:Pause
:Goto MM

The "Stop" command forces the program to stop. You can get this by going to [PRGM] {F}. You can have more than one goto going to a single Lbl. Work with this a little bit. We usually put a label at the very beginning of the program called ST, for start, and one right above the main menu, called MM.
Labels can only be 2 characters long, and they can only be uppercase letters or numbers.

Section 2.2---Menus