Author |
Topic |
|
Racey
Senior Member
USA
25 Posts |
Posted - Jul 20 2004 : 4:06:23 PM
|
I have the following condition in my code:
if ((sharedMem->poolData[idx].currentNumMsgs != sharedMem->poolData[idx].lastNumMsgs) || (sharedMem->poolData[idx].currentNumWords != sharedMem->poolData[idx].lastNumWords)) { ... }
I double clicked on 'lastNumMsgs' to view its definition. It was correctly displayed as 'unsigned int'. I then double clicked on 'currentNumWords'. Its definition was given as ')', not 'unsigned int' as I expected. I clicked off 'currentNumWords' and then double clicked on it again. Same result. I singled clicked within 'currentNumWords' and the definition was given as 'unsigned int'. I was able to repeat this about 4 or 5 times in rapid succession.
Then I double clicked on 'lastNumMsgs' and its definition was given as ')'. Clicked off the word, then double clicked it again and it was once again 'unsigned int'. Afterwards, the behaviour never appeared again.
This is the first time I've noticed this sort of thing happening. The file had not been open for very long, and I had clicked on 'Reparse Current File' prior to this so that I could utilitize the context dropdown menu to get to the function the code is in. However, more than a minute had elapsed and the status has changed from 'parsing' to 'ready'.
VA_X version 10.0.1246.0 MSDev version 6.0.8168.2
Playing around with it as I write this, I just had another peculiarity show up. I double clicked on 'currentNumMsgs' and the definition showed it as 'unsigned int'. I opened another file, played around in the file for a bit before closing it. Now, the definition for 'currentNumMsgs' reads as '/'. This happens consistently. If the cursor is just sitting in 'currentNumMsgs' and I open and close another file, the definition remains correct.
David |
|
feline
Whole Tomato Software
United Kingdom
19020 Posts |
Posted - Jul 21 2004 : 08:51:45 AM
|
is sharedMem an instance of a standard windows structure? without knowing what type it is, i cannot try and reproduce this using your example. |
zen is the art of being at one with the two'ness |
|
|
Racey
Senior Member
USA
25 Posts |
Posted - Jul 21 2004 : 11:21:42 AM
|
No, it's a large data structure comprised of other structures, arrays of structures, pointers to structures, arrays of pointers to structures, ints, unsigneds, and bit fields. I suppose you could say it's a standard C structure. The application uses very little windows-specific coding.
The instance where I get '/' as a definition behaves differently depending on what I have hilighted when I toggle back to the file. Note that it's only when something is hilighted...
Code snippet: void endTsrDemandCalc() { unsigned int idx; for (idx = 0; idx < TSR_POOL_TOTAL; ++idx) { // bunch of conditions using sharedMem from first example } }
TSR_POOL_TOTAL is #defined in an included header file.
Hilight 'idx' in the code definition, toggle to another open file then back. Definition displays it was 'void endTsrDemandCalc() {' instead of 'unsigned int'.
Hilight 'idx' in the for loop. After toggling, Definition is shown as 'for(' instead of 'unsigned int'.
Hilight TSR_POOL_TOTAL in the for loop. After toggling, Definition is shown as 'for(' instead of '#define TSR_POOL_TOTAL 8'. Context also changes in this instance. Before toggling, Context reads 'TSR_POOL_TOTAL'. After toggling, Context reads 'endTsrDemandCalc'.
In all 3 cases above, just after toggling back to the file, Definition reads '/' for a fraction of a second before changing to something a little more meaningful. |
Edited by - Racey on Jul 21 2004 11:56:58 AM |
|
|
|
Topic |
|
|
|