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 #288 background imageLoading...
Page #288 background image
Chawter
10
I
BASIC
Keywords
READ
Statement
READ
variable[,uariable,..
.I
Reads values from a DATA statement and assigns them
to
variables.
BASIC assigns values from the DATA statement on
a
one-to-one
basis. The first time READ is executed, the first value in the
first DATA statement is assigned to the
first
variable; the second
time, the second value is assigned to the second variable, and
so
on.
A
single READ may access
1
or
more DATA statements, or sev-
eral READS may access the same DATA statement. If a program
contains multiple DATA statements, BASIC reads them in the
or-
der they appear.
The values read must agree with the variable types specified in
a list
of
variables; otherwise,
a
“Syntax error” occurs.
If the number of variables in the READ statement exceeds the
number
of
elements in the DATA statement(s1, BASIC returns an
“Out
of
DATA” error message. If the number
of
variables speci-
fied is less than the number of elements in the DATA state-
ment(s), the next READ statements begin reading data at the
first unread element.
To reread DATA statements from the start, use the RESTORE
statement.
Example
READ
T
reads
a
numeric value from
a
DATA statement and assigns
it
to
variable T.
286

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