Programming
607
If Command
If Command
If Command
If Command
To execute only one command if a conditional test is true, use the general form:
Ê
Executed only if x>5; otherwise, skipped.
Ë
Always displays the value of x.
In this example, you must store a value to x before executing the
If
command.
Note:
Use indentation to make your programs easier to read and understand.
If...Then...EndIf Structures
If...Then...EndIf Structures
If...Then...EndIf Structures
If...Then...EndIf Structures
To execute one group of commands if a conditional test is true, use the structure:
Ê
Executed only if x>5.
Ë
Displays value of:
• 2x if x>5
• x if x
{
5
Ê
Ë
:If x>5
: Disp "x is greater than 5"
:Disp x
Ê
Ê
Ë
:If x>5 Then
: Disp "x is greater than 5"
: 2
†
x
!
x
:EndIf
:Disp x
Summary of Contents for TI-89 Voyage 200
Page 1: ...TI 89 Titanium Graphing Calculator...
Page 35: ...Getting Started 35 2 B u s i n e s s D B D B Press Result...
Page 44: ...Getting Started 44 3 0 D B D D Press Result...
Page 45: ...Getting Started 45 B D D 2 0 0 2 Press Result...
Page 46: ...Getting Started 46 D B Scroll down to October and press D 1 9 Press Result...
Page 60: ...Getting Started 60 Example Set split screen mode to TOP BOTTOM Press Result 3 B D...
Page 63: ...Getting Started 63 2 D B 4 Press Result...
Page 453: ...Differential Equation Graphing 453...
Page 468: ...Tables 468...
Page 539: ...Data Matrix Editor 539...