INF: QC/Win Watch Window Displays Arrays as Pointers

ID Number: Q78856

1.00

WINDOWS

Summary:

When using Microsoft QuickC for Windows (QC/Win) version 1.0 to

display an array in the Watch window, the array will be displayed as

if it were a pointer (that is, no brackets) rather than an array.

However, if the watch value is expanded, QC/Win will display all the

elements of the array, and not just the first element as it does with

pointers.

More Information:

The sample code below uses a character array called test. When adding

a watch expression to the Watch window, QC/Win displays exactly what

is typed in by the user, rather than looking into the symbol table for

its definition. The reason behind this is that the Watch window,

unlike the Locals window, allows for different types of editing.

Placing a watch on test displays the following

+test = 0xHHHH:0xHHHH

where HHHH is a hex address. However, the Locals display resembles the

following:

[BP-HHHH] +char test[20] = 0xHHHH:0xHHHH

The Locals window will search the symbol table, thereby displaying the

above form. Microsoft CodeView will also search the symbol table, and

display the array as an array.

Sample Code

-----------

/* Compile options needed: none

*/

void main(void)

{

char test[20];

}

Additional reference words: 1.00