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.
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?