Offset for Jump To... Option Appears Incorrect after $INCLUDE (33142)
This article was previously published under Q33142
SUMMARY
In the QuickBASIC Interpreter, the Jump To... option goes to a
physical line offset from the beginning of the file, excluding the
extra lines in the compiler's $INCLUDE files (if any).
However, when an error occurs in a compiled program, the number of the
line in error counts the lines in $INCLUDE files. This applies to
error line numbers shown in the Program Listing File, or in the
run-time error message "***** Error <n> at <line>" (which requires the
"Process Runtime Events" compiler option to get a line number).
Thus, if the main source file contains REM $INCLUDE or '$INCLUDE
statements, the Jump To... option in the interpreter will not show you
the proper line in the main program where the error occurred. This is
because the compiler counts the lines in the $INCLUDE files when
figuring the offset, while the interpreter environment does not.
To calculate the correct offset, subtract the number of lines in the
$INCLUDE files from the given error offset. Then select Jump To...
from the Search menu and use the smaller offset.
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB33142 |
|