![Texas Instruments TI-Nspire Скачать руководство пользователя страница 710](http://html.mh-extra.com/html/texas-instruments/ti-nspire/ti-nspire_manual-book_1094491710.webp)
698
Programming
À
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 function or program stops.
While...EndWhile loops
A
While...EndWhile
loop repeats a block of commands as long as a
specified condition is true. The syntax of the
While
command is:
While
condition
When
While
is executed,
condition
is evaluated. If
condition
is true, the
loop is executed; otherwise, control jumps to the command following
EndWhile
.
Note:
The
While
command does not automatically change the condition.
You must include commands that allow the function or program to exit
the loop.
At the end of the loop (
EndWhile
), control jumps back to the
While
command, where condition is re-evaluated.
To execute the loop the first time, the condition must initially be true.
•
Any variables referenced in the condition must be set before the
While
command. (You can build the values into the function or
program, or you can prompt the user to enter the values.)
•
The loop must contain commands that change the values in the
condition, eventually causing it to be false. Otherwise, the condition
is always true and the function or program cannot exit the loop
(called an infinite loop).
For example:
For i,0,5,1
Disp i
À
EndFor
Disp i
Á
x
|
5
x < 5
While x<5
--------
--------
EndWhile
--------
Содержание TI-Nspire
Страница 38: ...26 Setting up the TI Nspire Navigator Teacher Software ...
Страница 46: ...34 Getting started with the TI Nspire Navigator Teacher Software ...
Страница 84: ...72 Using the Content Workspace ...
Страница 180: ...168 Capturing Screens ...
Страница 256: ...244 Embedding documents in web pages ...
Страница 332: ...320 Polling students For detailed information on viewing and sorting poll results see Using the Review Workspace ...
Страница 336: ...324 Polling students ...
Страница 374: ...362 Using the Review Workspace ...
Страница 436: ...424 Calculator ...
Страница 450: ...438 Using Variables ...
Страница 602: ...590 Using Lists Spreadsheet ...
Страница 676: ...664 Using Notes You can also change the sample size and restart the sampling ...
Страница 684: ...672 Libraries ...
Страница 714: ...702 Programming ...
Страница 828: ...816 Data Collection and Analysis ...
Страница 846: ...834 Regulatory Information ...
Страница 848: ...836 ...