Programming
612
When
For
is executed, the variable value is compared to the end value. If variable does
not exceed end, the loop is executed; otherwise, program control jumps to the command
following
EndFor
.
Note:
The
For
command automatically increments the counter variable so that the
program can exit the loop after a certain number of repetitions.
At the end of the loop (
EndFor
), program control jumps back to the
For
command, where
variable is incremented and compared to
end
.
For example:
Ê
Displays 0, 1, 2, 3, 4, and 5.
Ë
Displays 6. When
variable
increments to 6, the loop is not executed.
Note:
You can declare the counter variable as local if it does not need to be saved after
the program stops.
Ê
Ë
:For i,0,5,1
: Disp I
:EndFor
:Disp i
i > 5
i
{
5
:For i,0,5,1
: --------
: --------
:EndFor
:--------
Содержание Voyage 200
Страница 36: ...Getting Started 36 D B D B Press Result ...
Страница 45: ...Getting Started 45 3 0 D B D D B D Press Result ...
Страница 46: ...Getting Started 46 D 2 0 0 2 D B Scroll down to October and press Press Result ...
Страница 60: ...Getting Started 60 B D Press Result ...
Страница 139: ...Previews 139 8 Complete the operation Press 2 d Steps and keystrokes Display 5 f 2 ...
Страница 181: ...Operating the Calculator 181 From the Keyboard From the Keyboard From the Keyboard From the Keyboard ...
Страница 453: ...Differential Equation Graphing 453 ...
Страница 468: ...Tables 468 ...
Страница 515: ...Split Screens 515 Note Both Top Bottom and Left Right splits use the same methods to select an application ...
Страница 777: ...Activities 777 ...