Does your editor/ide highlight that a++;
in this C/C++ code as part of a comment?
int a=1;
//some comment \
a++;
printf("%d\n",a);
And what about this?
int a=1;
//some comment ??/
a++;
printf("%d\n",a);
Does your editor/ide highlight that a++;
in this C/C++ code as part of a comment?
int a=1;
//some comment \
a++;
printf("%d\n",a);
And what about this?
int a=1;
//some comment ??/
a++;
printf("%d\n",a);
From http://forums.topcoder.com/?module=Thread&threadID=666932
Quick note on which popular editors show this as a comment : vim - yes emacs - no :) kate - no gedit - yes netbeans - yes kwrite - yes
Kate (3.4) only highlights the first test, fails hilighting the second test
// hello folks \
int a = 0;
// hello folks ??/
int a = 0;
vim 7.2 sees it as a comment, and gcc 3.4.3 compiles it as a comment.
XCode and CodeWarrior handle it properly. (But not the trigraph, lol.)
Good question! I was going to ask a question about this until I found this one.
The Visual-DSP++ IDE from Analog Devices does not highlight either comment when writing in assembly or C. For example:
r1 = dm(pPointer1); // Store pointer to r0\
r0 = lshift r1 by -16; // Not highlighted as a comment but DOES NOT EXECUTE.
dm(i0,m1) = r0;
dm(i0,m1) = r1;