Using if, lbl, and goto to control program flow – Texas Instruments TITANIUM TI-89 User Manual

Page 606

Advertising
background image

Programming

606

Using If, Lbl, and Goto to Control Program Flow

Using If, Lbl, and Goto to Control Program Flow

Using If, Lbl, and Goto to Control Program Flow

Using If, Lbl, and Goto to Control Program Flow

An

If...EndIf

structure uses a conditional test to decide whether or not to execute one or

more commands.

Lbl

(label) and

Goto

commands can also be used to branch (or jump)

from one place to another in a program.

F2 Control Toolbar Menu

F2 Control Toolbar Menu

F2 Control Toolbar Menu

F2 Control Toolbar Menu

To enter

If...EndIf

structures, use the Program

Editor’s

Control

toolbar menu.

The If command is available directly from the

„ menu.

To see a submenu that lists other

If

structures,

select

2:If...Then

.

When you select a structure such as

If...Then...EndIf

, a template is inserted at the

cursor location.

:If | Then

Ê

:EndIf

Ê

The cursor is

positioned so that you
can enter a conditional
test.

Advertising