If-then – Texas Instruments TI-84 User Manual

Page 440

Advertising
background image

Chapter 16: Programming

437

If

If

If

If

Use

If

for testing and branching. If

condition

is false (zero), then the

command

immediately

following

If

is skipped. If

condition

is true (nonzero), then the next

command

is executed.

If

instructions can be nested.

:If condition
:command (if true)
:command

If-Then

If-Then

If-Then

If-Then

Then

following an

If

executes a group of

commands

if

condition

is true (nonzero).

End

identifies the end of the group of

commands

.

:If condition
:Then
:
command (if true)
:command (if true)

Program

Output

Advertising