EasyManua.ls Logo

Commodore CBM - Page 378

Commodore CBM
447 pages
Print Icon
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...
Error Message
RETURN
WITHOUT GOSUB
STRING
TOO
LONG
SYNTAX
TYPE
MISMATCH
UNDEFD STATEMENT
Cause and Suggested Remedies
A
RETURN
statement was encountered
without
a previous matching GOSUB state-
ment
being executed.
Insert a GOSUB statement or delete the
RETURN
statement. The error may
be
caused
by dropping
into
the subroutine code inadver-
tently. In this case correct the program flow.
An
END
or
STOP
statement placed
just
ahead
of the subroutine serves
as
a debugging aid.
An
attempt
was made by use of the con-
catenation operator (+) to create a string
longer than 255 characters.
Break the string
into
two
or more shorter
strings
as
part of the program operation. Use
the
LEN
function
to
check string lengths
before concatenating them.
There
is
a syntax error in the line
just
en-
tered (immediate mode) or scanned for execu-
tion (program mode). This
is
the most com-
mon error message, and
is
caused by such
things
as
misspellings, incorrect punctuation,
unmatched parentheses, extraneous charac-
ters, etc.
Examine the line carefully and make correc-
tions. Note
that
syntax errors in a program are
diagnosed at run time,
not
at the time the lines
are entered from the keyboard. You can elimi-
nate many syntax error messages by carefully
scrutinizing
newly
entered
program
lines
before running the program.
An
attempt
was made to enter a string
into
a numeric
Assignment
variable or vice versa,
or
an
incorrect type was given
as
a
function
parameter.
Change the offending item
to
correct type.
Refer
to
Chapter 4 for acceptable parameter
types.
An
attempt
was made
to
branch
to
a nonex-
istent line number.
Insert a statement
with
the necessary line
number or branch to another line number.
365

Table of Contents

Other manuals for Commodore CBM

Related product manuals