KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q47020: Don’t Use #line While Debugging in QuickC or Using CodeView

Article: Q47020
Product(s): See article
Version(s): 1.01 2.00 2.01
Operating System(s): MS-DOS
Keyword(s): ENDUSER | S_CodeView | mspl13_c
Last Modified: 11-OCT-1989

Do not use the #line directive when using the debug facility under
QuickC or while using CodeView.

The #line directive tells the preprocessor to change the compiler's
internally stored line number and filename to a given line number and
filename. The compiler uses the line number and filename to refer to
errors that it finds during compilation. The line number normally
refers to the current input line, and the filename refers to the
current input file. The line number is incremented after each line is
processed.

If you change the line number, the compiler ignores the previous
values and continues processing with the new values. Therefore, if you
debug or use CodeView, the trace does not match up to your source
code.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.