Commodore PET User Manual page 378

Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cbm

Table of Contents