Goto with {$line+} Gives Error 293

Product Version(s): 3.20 3.3x
Operating System:   MS-DOS
Flags: ENDUSER | TAR17029
Last Modified: 30-SEP-1988    ArticleIdent: Q10386

According to Page 171 of the "Microsoft Pascal Compiler for the MS-DOS
Operating System Reference Manual," a goto from a procedure to a
higher-level procedure is permitted, although it is considered
harmful.

However, the code below generates the "error 293 - Goto invalid"
message at compile time. If the {$line+} metacommand is removed, then
the message is not generated.

This error message occurs because if debugging is on (invoked by
{$line+}), a procedure entry and exit code is generated. The exit code
is bypassed by the goto, and from then on error recovery is corrupted.

The following is a short code example:

   {$LINE+}
   PROGRAM TEST(INPUT,OUTPUT);
   LABEL 99;

   PROCEDURE A;
   BEGIN
   GOTO 99;
   END;

   BEGIN {MAIN}
   A;
   99:WRITELN('AT LABEL 99');
   END.
