NO

Author Topic: an apostrophe in a comment reveals a POIDE editor bug  (Read 3078 times)

najevi

  • Guest
an apostrophe in a comment reveals a POIDE editor bug
« on: August 24, 2006, 09:18:35 AM »
A visual cue within the IDE does not behave as expected when I have used an apostrophe (') within a comment. The buggy visual cue is the dotted line connecting opening and closing parentheses.
Code: [Select]
int main(void)
{
    printf("Hello, world!\n"); // bob's comment
    return 0;
}


You can paste this simple example into a new source  window in the IDE and you'll see what I mean.
Place your cursor next to either opening { or closing } and the familiar (and helpful) dotted line that links the two parentheses will not appear.

Now delete the apostrophe in the word "bob's" and return to either parenthesis ... the dotted line connecting { and } appears again!

The apostrophe makes no difference (that I can detect) to
  • the compile process
  • the correct collapsing and expanding  of code between the "fold" marks ithat appear n the left hand margin
The severity of annoyance is not evident in this example. In a longer piece of code with many compound statements or with many functions defined I have seen the wrong two parentheses connected by this dotted line feature. This can be very disorienting but as stated below, the quick workaround is to search for apostrophes and delete any that appear in your coments. Apostrophes appearing in string constants do not produce the same bug.

The solution - strip apostrophes from your comments.

A search for "apostrophe" reveals no relevant posts. Is any reader aware of a POIDE tweak or add-in that fixes this problem?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: an apostrophe in a comment reveals a POIDE editor bug
« Reply #1 on: August 24, 2006, 01:22:33 PM »
Quote from: "najevi"
A visual cue within the IDE does not behave as expected when I have used an apostrophe (') within a comment.

Strange coincidence - I found this myself last night, after posting Beta 5. It's fixed now. It will either be in the next beta or stable release, depending on the number of severe bug reports...
/Pelle

najevi

  • Guest
Re: an apostrophe in a comment reveals a POIDE editor bug
« Reply #2 on: August 24, 2006, 03:58:41 PM »
Who could ask for any better responsiveness than this.

Thank you!