700
Programming
In this example, the
If
command can be anywhere in the loop.
The
If
command could also use a
Goto
command to transfer program
control to a specified
Lbl
(label) command.
Repeating a loop immediately
The
Cycle
command immediately transfers program control to the next
iteration of a loop (before the current iteration is complete). This
command works with
For...EndFor
,
While...EndWhile
, and
Loop...EndLoop
.
Lbl and Goto loops
Although the
Lbl
(label) and
Goto
commands are not strictly loop
commands, they can be used to create an infinite loop. For example:
As with
Loop...EndLoop
, the loop should contain commands that let the
function or program exit from the loop.
Changing mode settings
Functions and programs can use the
setMode()
function to temporarily
set specific calculation or result modes. The Program Editor’s
Mode
menu
makes it easy to enter the correct syntax without requiring you to
memorize numeric codes.
Note:
Mode changes made within a function or program definition do
not persist outside the function or program.
Setting a mode
1. Position the cursor where you want to insert the
setMode
function.
2. From the
Mode
menu, select the mode to change, and select the new
setting.
The correct syntax is inserted at the cursor location. For example:
When the If command is:
The loop is:
At the beginning of the loop
Executed only if the condition is true.
At the end of the loop
Executed at least once and repeated
only if the condition is true.
Lbl START
--------
--------
Goto START
--------
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 ...