Programming
567
•
Control structures such as
If...EndIf
commands use a conditional test to decide
which part of a program to execute.
•
Loops commands such as
For...EndFor
repeat a group of commands.
Using Indentation
Displaying Calculated Results
In a program, calculated results are not displayed unless you use an output command.
This is an important difference between performing a calculation on the Home screen
and in a program.
For more complex programs that
use
If...EndIf
and loop structures
such as
For...EndFor
, you can make
the programs easier to read and
understand by using indentation.
:If x>5 Then
: Disp "x is > 5"
:Else
: Disp "x is < or = 5"
:EndIf
These calculations will not
display a result in a program
(although they will on the Home
screen).
:12
ù
6
:cos(
p
/4)
:solve(x^2–x–2=0,x)
Output commands such as
Disp
will display a result in a program.
:Disp 12
ù
6
:Disp cos(
p
/4)
:Disp solve(x^2–x–2=0,x)
Summary of Contents for Titanium TI-89
Page 9: ...Getting Started 6 TI 89 Titanium keys Ë Ì Í Ê ...
Page 34: ...Getting Started 31 2 or D 2 B u s i n e s s D B D B Press Result ...
Page 43: ...Getting Started 40 3 0 D B D D B D Press Result ...
Page 44: ...Getting Started 41 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Page 58: ...Getting Started 55 Example Set split screen mode to TOP BOTTOM Press Result 3 B D ...
Page 70: ...Getting Started 67 ...
Page 175: ...Operating the Calculator 172 From the Keyboard ...
Page 456: ...Tables 453 ...
Page 527: ...Data Matrix Editor 524 ...