EasyManua.ls Logo

Radio Shack TRS-80

Radio Shack TRS-80
236 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
Loading...
f.
Type a
line
more than
70 characters
long?
g.
Misspell PRINT or INPUT (it
happens!)?
h.
Accidentally type a
stray character
in
the
line,
especially
an extra comma or semi-
colon?
2. If the error is in a
READ statement,
almost all the previous possibilities apply,
plus:
a. Is
there really a DATA statement
for
the computer
to
read?
Remember, it will only
read
a
piece
of DATA once unless
it is RESTOREd.
Example
:
10
READ
X,Y
,Z
20 DATA
2,5,
ERROR: There are
only
two numbers for the Computer
to read. If you mean for Z
to be
zero,
you must say so.
20
DATA 2,5,0
3.
If the bad area is a FOR-NEXT loop, most of the previous possibilities
also apply, plus:
b. Do you have a NEXT statement to match the FOR?
Example:
10
FOR
A=l TO N
ERROR:
Where's the NEXT A?
c. Do you have
all
the requirements for a loop
a starting
point,
an ending point, a
variable
name, and
a STEP size if it's not 1?
Example:
10 A=l
TO
N
ERROR:
Must have
a
FOR
and
a
NEXT.
d. Did
you accidentally
nest
2 loops using
the same variable in
both loops?
Example:
10 FOR X=l TO 5
20 FOR X=l TO
3
30
PRINT X
40
NEXT X
50
NEXT
X
ERROR:
The
nested loops
must have
different
variables.
at*
9
'A
WOTErTntie^tetMiHiicamma" intae first
Hse2# ,
:
fcan
cause a fuH-bJowft program crash, requiring the
Computer to
be
tarried off,
then
ori again to clear
the trouble.
:':
Some
of
these FOR-NEXTloop
errors
won't
cause actual error messages;
instead
your program
may
wind
up
in
endless loops, requiring
the Use
of
the
'BREAK key.
169

Other manuals for Radio Shack TRS-80

Related product manuals