Programming
699
À
Initially sets x.
Á
Displays 0, 1, 2, 3, and 4.
Â
Increments x.
Ã
Displays 5. When x increments to 5, the loop is not executed.
Loop...EndLoop loops
A
Loop...EndLoop
creates an infinite loop, which is repeated endlessly.
The
Loop
command does not have any arguments.
Typically, you insert commands in the loop that let the program exit from
the loop. Commonly used commands are:
If
,
Exit
,
Goto
, and
Lbl
(label).
For example:
À
An
If
command checks the condition.
Á
Exits the loop and jumps to here when
x
increments to 6.
Note:
The
Exit
command exits from the current loop.
0
&
x
À
While x<5
Disp x
Á
x+1
&
x
Â
EndWhile
Disp x
Ã
Loop
--------
--------
EndLoop
--------
0
&
x
Loop
Disp x
x+1
&
x
If x>5
À
Exit
EndLoop
Disp x
Á
Summary of Contents for TI-Nspire
Page 38: ...26 Setting up the TI Nspire Navigator Teacher Software ...
Page 46: ...34 Getting started with the TI Nspire Navigator Teacher Software ...
Page 84: ...72 Using the Content Workspace ...
Page 180: ...168 Capturing Screens ...
Page 256: ...244 Embedding documents in web pages ...
Page 336: ...324 Polling students ...
Page 374: ...362 Using the Review Workspace ...
Page 436: ...424 Calculator ...
Page 450: ...438 Using Variables ...
Page 602: ...590 Using Lists Spreadsheet ...
Page 676: ...664 Using Notes You can also change the sample size and restart the sampling ...
Page 684: ...672 Libraries ...
Page 714: ...702 Programming ...
Page 828: ...816 Data Collection and Analysis ...
Page 846: ...834 Regulatory Information ...
Page 848: ...836 ...