Texas Instruments TI-80 Calculator User Manual


 
Programming 10-9
FOR(
(
PRGM CTL
, item 4) is used for looping and
incrementing. It increments the variable from the beginning
value to the ending value, by the specified increment. The
ending value is a maximum or minimum value that is not to be
exceeded. The increment is optional (if not specified, 1 is
used) and can be negative (ending value < beginning value).
END
identifies the end of the loop.
FOR(
loops can be nested.
:FOR(
variable
,
begin
,
end
,
increment
)
:
command while end not exceeded
:
...
:END
:
command
END
(
PRGM CTL
, item 5) identifies the end of a group of
commands. Each
FOR(
and each
IF-THEN
or
IF-THEN
-
ELSE
group must have an
END
at the “bottom.”
PAUSE
(
PRGM CTL
, item 6) suspends execution of the
program so that you can see answers or graphs. During the
pause, the dotted pause indicator is displayed. When
DISP
or
DISPGRAPH
is executed, the appropriate screen is displayed.
Press
¸
to resume program execution.
FOR(
END
END
PAUSE