EasyManuals Logo
Home>Texas Instruments>Calculator>TI-Nspire

Texas Instruments TI-Nspire Software Guide

Texas Instruments TI-Nspire
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #350 background imageLoading...
Page #350 background image
338 Programming
For variable, begin, end [, increment]
À Variable used as a counter
Á Counter value used the first time For is executed
 Exits the loop when variable exceeds this value
à Added to the counter each subsequent time For is executed (If this
optional value is omitted, the increment is 1.)
When
For is executed, the variable value is compared to the end value. If
variable does not exceed end, the loop is executed; otherwise, control
jumps to the command following
EndFor.
Note: The For command automatically increments the counter variable
so that the function or program can exit the loop after a certain number
of repetitions.
At the end of the loop (
EndFor), 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 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:
ÀÁÂÃ
i > 5
i { 5
For i,0,5,1
--------
--------
EndFor
--------
For i,0,5,1
Disp i
À
EndFor
Disp i
Á

Table of Contents

Other manuals for Texas Instruments TI-Nspire

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-Nspire and is the answer not in the manual?

Texas Instruments TI-Nspire Specifications

General IconGeneral
TypeDisplay
Form factorPocket
Product colorBlue, White
Display resolution320 x 240 pixels
Display size (HxV) (imperial)0 \
Compatible operating systemsWindows Vista/XP Mac OS X 10.4/10.5
Battery typeAAA
Number of batteries supported4
Weight and Dimensions IconWeight and Dimensions
Dimensions (WxDxH)100 x 198.3 x 28.7 mm

Related product manuals