Donate to support Ukraine's independence.

TI-83/TI-84 BASIC Tutorial #3

Lbl and Goto

A label is basically a spot the program could jump to when needed. Goto is the command that tells the program what label to go to. Back in the days of standard BASIC, every line had a number before it. TI-BASIC doesn't use line numbers, rather you have to specify a label to go to. You do that with the Lbl command. Here is a program that will jump from one spot to another:

:Disp "COMMAND 1
"
:Goto A
:Disp "COMMAND 3
"
:Lbl A
:Disp "FIFTH LIN
E"
The output of that program would be as follows:
COMMAND 1
FIFTH LINE

The line Disp "COMMAND 3" doesn't show up. The reason is because the Goto told the program to skip everything until it found Lbl A and continue from there.

Previous tutorial ^ Next tutorial



This is how we (partially) recoup costs

Valid XHTML 1.1