EasyManua.ls Logo

Radio Shack TRS-80 - Page 172

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...
e.
Does a
variable in a loop
have the same letter as
the loop
counter?
Example:
10
A=22
20
FOR
R=l
TO
5
30
R=18
40
Y=R*A
50
PRINT Y
60
NEXT R
ERROR:
The
value
of R was changed by
another R
inside
the loop, and
NEXT R was
overrun,
since
18 is
larger than
5.
f.
Did you nest
loops
incorrectly with
one not
completely
inside the other?
Example:
10
FOR X=l
TO
6
20
FOR Y=l
TO 8
30
SET
(X,Y)
40 NEXT X
50
NEXT Y
4.
If the goofed-up
statement is an
IF-THEN
or GOTO
a. Does the line
number specified by
the THEN or GOTO
really
exist? Be especially
careful
of this error
when you eliminate a
line in the
process of
"improving" or
"clean-
ing up" a
program.
5.
The error
comes
back as
SORRY
but
the P.M. indicates
there is room left in
memory:
If you get a
SORRY
and are
using
the
A(X)
numeric array,
be sure to check
P.M. then
subtract 4
bytes
for each array
element used. You have
probably overrun the
amount of
available memory.
6. The error comes
back
as HOW? and
the
program line
containing
the error is printed out
with
a
question mark buried
somewhere inside:
a. Did you
exceed
the limits
of
one
of
the built-in
functions?
b.
Did one of
the values
on the line
exceed the
maximum
or minimum size for LEVEL
I
numbers?
170

Other manuals for Radio Shack TRS-80

Related product manuals