With
HOW?
messages, the
Computer inserts a
question
mark
right
after
the error. For
example:
HOW?
10
PRINT INTC
I
) 7/23
The question mark
tells us that the error
was discovered during
execution of
the INT
function. We can guess that
the value for I
probably exceeded
the allowable range for the
INT
function
(value should be greater than
-32768
and less than +32768).
Now
let's
take a look
at some of the
common
sources of "computer-detected
errors".
1.
Assume
the error is in a
PRINT, or INPUT
statement.
Did
you:
a. Forget one of
the
needed pair of
quotation
marks?
Example:
10
PRINT "ANSWER rs, X:
GOTO
5
ERROR: No
ending
quotation mark
after
I S
b.
Use
a
variable name
other
than a single letter
of
the alphabet?
Example:
10
INPUT
AG.S1
ERROR: LEVEL I
variable
names
can
have neither more
than
one letter, nor a letter/
number combination.
c. Forget a semicolon or comma
separating variables or text,
or bury
the semicolon or
comma inside
quotation
marks?
Example:
10 PRINT "THE VALUE I S
;
"
V
ERROR:
The
semicolon
is inside the quotation
marks (so the "string" of
words and
the
variable
are not
properly
separated.)
d. Forget the
line number,
accidentally
mix a letter
in
with
the number, or use a
line
number larger
than 32767?
Example:
72B3
PRINT "BAD
LINE NUMBER."
L,
-ERROR
e.
Accidentally have a double
quotation mark in
your
text?
Example:
10 PRINT "HE SAID
"HELLO
THERE
."
"
How
could we vetify ttiis
immediately*?
Jwst«!Qiri-
m«nd
the
Computer
to
PRINT I
(usin^ho
lifts:
'
number).
':
'\:-^
:.'„.:..'.
:',iw'
/-::/
'.-:
Yes,
we know it's ok
if
the missing
quote is
the; last
ehajtseter
in the
-line."
168