EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 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 #166 background imageLoading...
Page #166 background image
Chapter
10
I
BASIC Keywords
FOR/NEXT
Statement
FOR
variable
=
initial value
TO
final value
[STEP
increment]
NEXT
[variable]
Establishes a program loop that allows a series of program state-
ments to be executed
a
specified number
of
times.
Variabb
must be either integer or single precision. Each
FOR/
NEXT
loop
must have
a
unique variable.
Increment
is the number BASIC
adds to the
initial value
each
time the loop
is
executed. If you omit
increment,
BASIC incre-
ments by
1.
If
increment
is
a negative value, BASIC decreases
the
initial value
each time through the loop. In this case, the
fi-
nal value
must be less than the
initial value.
BASIC executes the program lines following the FOR statement
until it encounters
a
NEXT. At this point, it increases
initial
value
by the STEP
increment.
If
initial value
is less than or equal
to
final value,
BASIC branches back to the line after FOR and
repeats the process. When
initial value
is greater than
final
value,
the loop
is
completed, and BASIC continues with the state-
ment after NEXT.
Note:
BASIC skips the body of the loop if
initial value
is greater than
final value
when
increment
is positive
or
if
final value
is greater than
initial value
when
in-
crement
is negative.
164

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals