Run-time errors generate an error message, as well as a set of numbers that
refer to the instruction during which the error occurred. "S" stands for
"Segment", "P" for "Procedure" and "I" for "Instruction Count". These can be
correlated with the textfile by using the System List options, (*$L+*) or
(*$L<filename>*), while compiling. Doing so produces an annotated listing of
the text, with the S, P and I numbers included.
For example, here's a very simple program compiled with the listing option:
(1) (2) (3:4) (5)<--Text----------->
1 1 1:D 1 (*$LPrinter:*)
2 1 1:D 1 Program Example;
3 1 1:D 3
4 1 1:D 3 Var S:string;
5 1 1:D 44
6 1 1:0 0 Begin
7 1 1:1 0 Readln(S);
8 1 1:1 21 Writeln(S)
9 1 1:0 40 End.
Key:
(1) Line number of text
(2) Segment number (S#): When S# values do not appear in your listing, the
error occurred in that segment of the operating system. S#0 is
System.Pascal, while S#17-31 are usually SYSTEM.LIBRARY segments.
(3) Procedure number (P#) is the number within the segment designated by the
S#.
(4) Nesting level (D=declaration)
(5) Instruction count (I#) is the number of instructions counted from the
beginning of the procedure. It indicates the count at the beginning of
each line; a value between two lines, then, means the error occurred in
the middle of the line.
Warning: When using Apple Pascal Version 1.0, do not use $L+ as your listing
option. Doing so will cause you to lose your code file, and possibly your
operating system. Instead, specify a disk file on a volume other than the one
that you wish to be the destination of your code file. Better yet, use
(*$LPrinter:*) to put the listing directly onto your printer. The $L+ option
works correctly in later versions.