Outrageous IDE bug (-: Really! :-)

Outrageous IDE bug (-: Really! :-)

Post by Fabrizio Oddo » Fri, 21 Feb 1997 04:00:00



Let's suppose we have this C source around:

if (something) {
  // corrupt heap :-)
  }
else {
  // trash master directory block B-}
  }

The "Balance" command will act improperly. (The same happens if you
double-click on a parenthesis.)
IMHO it ought to take comments into consideration.

(We **want** to embed smileys in comments, don't we?)

--

http://www.kagi.com/authors/fab/

 
 
 

Outrageous IDE bug (-: Really! :-)

Post by Conor MacNei » Fri, 21 Feb 1997 04:00:00



>Let's suppose we have this C source around:

>if (something) {
>  // corrupt heap :-)
>  }
>else {
>  // trash master directory block B-}
>  }

>The "Balance" command will act improperly. (The same happens if you
>double-click on a parenthesis.)
>IMHO it ought to take comments into consideration.

>(We **want** to embed smileys in comments, don't we?)

You've got to stick your tongue out :-P

A more serious flaw, IMHO, with the balancing is that it really assumes
the above style where the opening parenthesis is on the same line
as the control statement.

Another common style, and the one I use, of course, is

if (something)
{
    // blah

Quote:}

else
{
    // blah blah

Quote:}

On a long function, when the editor displays the "left counterpart"
I just get to see my single { at the top of the window and I have no
idea of the control statement, which is the most useful part of this
feature, I think.

I believe it would be pretty simple to test for a line with nothing but
the { and in that case to also show the line above it. That way this
feature would be useful for both styles.

OK, its a minor issue. Anyway, please don't tell me that the other
style is better. You wont convince me and I'm sure I can't convince
you of the considerable benefits of my preferred style.

Cheers

--
Conor MacNeill

Cognet Pty Limited

 
 
 

Outrageous IDE bug (-: Really! :-)

Post by Glenn M. Frazi » Fri, 21 Feb 1997 04:00:00



>Let's suppose we have this C source around:

>if (something) {
>  // corrupt heap :-)
>  }
>else {
>  // trash master directory block B-}
>  }

>The "Balance" command will act improperly. (The same happens if you
>double-click on a parenthesis.)
>IMHO it ought to take comments into consideration.

>(We **want** to embed smileys in comments, don't we?)

I just recently had a very long and ugly function with lots of nested
if/else stuff in it that we "inherited" from an older project. While tuning
the thing and preparing to turn it into something a little more modular,
this smiley bug caused no-end of frustration. Paging through the mess to
finally discover that the use of parentheses(sp?) throughout the comments
was not my idea of "fun".

Under most circumstances, this is a very minor "bug". But that doesn't mean
it shouldn't be fixed.

-gf

--

Image Refinery Productions, Inc.     http://image.refinery.com
283 Second Street Pike, Suite 130        voice:+1 215 364 4590
Southampton, PA 18966  U.S.A.              FAX:+1 215 364 4591