Author |
Topic |
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Jan 26 2004 : 6:54:01 PM
|
When you are inside a do/while loop, the definition bar just says "do". It would be more helpful if it said something like "do {...} while (i >= 10)" |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
PatLuja
Tomato Guru
Belgium
416 Posts |
Posted - Jan 27 2004 : 02:52:22 AM
|
Hello Stephan (and all others),
I feel your totally right.
Another example of this is the else of an if-statment. Bringing ones cursor right before a closing brace of the if-statement, presents the if-statement: "if (boolean) {". Bringing ones cursor right before a closing brace of the else-statement, presents "else {" Maybe it could present something like "if (boolean) {...} else {". This would be more informative.
Thank you.
With kind regards, Patrick Luja.
|
|
|
WannabeeDeveloper
Tomato Guru
Germany
775 Posts |
Posted - Jan 27 2004 : 03:06:02 AM
|
To get into it any deeper: I'd like to see in which case I am (in a switch() case:).
For example, if I'm in the WM_CLOSE case of my WndProc, I'd like to see "case WM_CLOSE:" in the Definition-Field...
|
|
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Jan 27 2004 : 6:44:03 PM
|
Patrick: I half-agree, but what if there were a whole list of if-else clauses? What would you display then?
Wannabee: I agree. I notice that if the code for the case has braces round it -- for example if it has local variables within it -- then the definition bar shows the case statement, not the switch statement. But if there are no braces, it shows the switch not the case. I would like to see both the switch and the case every time: something like "switch (nArg) { case (ARG_BLAH):". |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Jan 27 2004 : 8:43:27 PM
|
The else clause only ever applies to one if, so I would want the correct one displayed. The if of an else if essentially closes the first else clause, so that if is the only one active.
Hmmm. But, what if you had nested ifs? Would you want all of them displayed? I can picture the context text getting VERY long. I guess that would be added incentive to restructure your code....
|
Joe Pizzi |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - Jan 27 2004 : 8:52:07 PM
|
If blocks are nested, you certainly only get the inner one. That's already true.
My point is that if you have code like
if (i == 1) {
DoStuff();
}
else if (i == 2) {
DoOtherStuff();
}
else {
DoThirdStuff();
}
and you're inside the final else clause, you don't really want the definition bar to say
if (i == 2) {...} else { because that would be misleading -- it implies that the else covers all cases where (i != 2). |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
PatLuja
Tomato Guru
Belgium
416 Posts |
Posted - Jan 30 2004 : 03:01:35 AM
|
Hello Stephen,
I must say you have a point there.
Maybe the following should be displayed: ... else if (i == 2) {...} else { Displaying the whole list could be too long indeed. The main point here is that displaying something like I suggested above is much better as only displaying: else { which leaves you clueless where you exactly are.
I hope they can really do something like this. When someone comes up with a better suggestion I'm eager to hear them. Thanks.
Stephen and jpizzi, thanks for your input.
With kind regards, Patrick Luja |
|
|
|
Topic |
|