EasyManuals Logo
Home>Texas Instruments>Desktop>TI-99/4A

Texas Instruments TI-99/4A User Reference Guide

Texas Instruments TI-99/4A
204 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 #76 background imageLoading...
Page #76 background image
NEXT
NEXT
control·variable
Thf'
NEXT
statement
is
always
paired
with
the
FOR-TO-STEP
statement
for construction of a loop.
The
control-variable is the
same one
that
appears
in the corresponding
FOR-TO-STEP
statement.
The
N
EX
T
statement
actually controls
whether
the computer will
repeat the loop or exit to the program line following the
NEXT
statement.
When the computer encounters the
NEXT
statement, it adds the
previously evaluated
increment
in
the
STEP
clause
to
thf' cantm/-
variable.
It
then tests the control-variable
to
see if it exceeds the
previously evaluated
limit
specified in the
FOR
-
TO-STEP
statement.
If
the control-variable does not exceed
the
hmit,
the
loop
is
repeated.
11-56
Examples:
>NEW
>100
REM
COUNTING
FROM
1
TO
10
>110
FOR
X=1
TO
10
>120 PRINT
Xi
>130
NEXT
X
>140
END
>RUN
1 Z
3
4
5
6
7 8 9
10
**
lJON~
**
>NEW
>100
REM
ROCKET
COUNTDOWN
>110
CALL
CLEAR
>120
FOR
1=10
TO
1
STEP
-1
>130
PRINT
I
>140
FOR
DELAY=1
TO
ZOO
>150
NEXT
DELAY
>160
CALL
CLEAR
>170
NEXT
I
>180
PRINT
"BLAST
OFF!"
>190
REM
CHANGE
SCREEN
COLOR
>200
FOR
COLOR=2
TO
16
STEP
2
>210
CALL
SCREEN(COLOR)
>220
FOR
DELAY=1
TO
100
>~50
NEXT
DELAY
>240
NEXT
COLOR
>250
END
>RUN
--computer
wilL
flash
countdowl
BLAST
OFF!
--screen
wiLl
chClnge
coLor
8
times
**
DONE:
**
User's
Reference
Guide

Other manuals for Texas Instruments TI-99/4A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-99/4A and is the answer not in the manual?

Texas Instruments TI-99/4A Specifications

General IconGeneral
BrandTexas Instruments
ModelTI-99/4A
CategoryDesktop
LanguageEnglish

Related product manuals