T3000 Invalid compiler error with missing gosub line reference

When a gosub call refers to a line number that does not exist, a misleading compiler error is generated that complains about the last line in the program. If you add another line after the last line, the error moves to the new last line.

If multiple lines with bad gosub references are found, each will result in the invalid compiler error.

If multiple lines contain a valid or invalid gosub, the exact same error will be produced for each of these lines.

The error printed is the following:
“wrong or missing line number in line -last line number in file-”

The compiler should indicate that the line referenced by the gosub is not a valid line number.

Thanks for the feedback, Fandu will work on this right after the local holiday, May5.


I will release this change in the next release . Thanks!

Hi Fan Du,

One of the things that I observed is that the line numbers in the errors sometimes did not match the line numbers in the code because the numbering was altered as part of compilation. So please ensure that the line number in the error matches the line number in the users code.



1 Like

We could almost get rid of the line numbers, theyre only used for gotos…. We’ll mull that one over.

Fandu will add an auto renumber feature, our early original T3000 had one but it has disappeared somewhere along the line.


1 Like