Texas Instruments TI-83 Calculator User Manual


 
Programming 16-11
8316PROG.DOC TI-83 international English Bob Fedorisko Revised: 02/19/01 1:23 PM Printed: 02/19/01 1:39
PM Page 11 of 22
While performs a group of
commands
while
condition
is
true.
condition
is frequently a relational test (Chapter 2).
condition
is tested when
While is encountered. If
condition
is true (nonzero), the program executes a group
of
commands
.
End signifies the end of the group. When
condition
is false (zero), the program executes each
command
following
End. While instructions can be nested.
:While
condition
:
command
(while
condition
is true)
:
command
(while
condition
is true)
:End
:
command
Program Output
Repeat repeats a group of
commands
until
condition
is
true (nonzero). It is similar to
While, but
condition
is tested
when
End is encountered; therefore, the group of
commands
is always executed at least once.
Repeat
instructions can be nested.
:Repeat
condition
:
command
(until
condition
is true)
:
command
(until
condition
is true)
:End
:
c
ommand
Program Output
While
Repeat