KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q68146: QuickC Displays "Incompatible Operands" When Watching Arrays

Article: Q68146
Product(s): See article
Version(s): 2.00 2.01
Operating System(s): MS-DOS
Keyword(s): ENDUSER | fixlist2.50 | mspl13_c
Last Modified: 11-JAN-1991

Attempting to watch individual elements of global arrays in the Debug
window may result in the message "Incompatible operands" being
displayed. This problem only occurs when a Program List is created
containing more than one C module.

The following steps illustrate the problem:

1. Create two C modules similar to the ones below and add them
   to a program list.

          TEST.C                         DUMMY.C
    ------------------                -------------

    #include<string.h>                #define dummy

    char str[80];

    void main(void)
    {
         strcpy(str, "Hello World");
    }

2. Rebuild the application with debug (CodeView) information.

3. Trace through the program by pressing F8.

4. Enter str and str[0] into the Watch (Debug) window.

The following lines will be displayed in the Debug window:

   str : <Cannot display>
   str[0] : <Incompatible operands>

Microsoft has confirmed this to be a problem in QuickC versions 2.00
and 2.01. The problem does not occur in versions 2.50 and 2.51.

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.