Hi folks,
actually it is _not_ a block comment on a block comment.
The second block comment is _inside_ a string !!!
It came up while working on a program to generate
C code. I was debugging it, so I decided to print the
comment in order to look at the code I was generating
PA
From: Kein-Hong Man <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED],Discussion of the SciTE editor
<[email protected]>
To: Discussion of the SciTE editor <[email protected]>
Subject: Re: [scite] Re: C syntax highlight error
Date: Tue, 13 Mar 2007 22:01:52 +0800
Philippe Lhoste wrote:
Pedro A ARANDA wrote:
This simple code sample highlights a problem
with C syntax highlight ;-)
Sample code starts here:
/*
printf("\nargv[] = { \n");
for (i=0;argv[i] != NULL;i++)
printf("/* argv[%2d] = */ \"%s\",\n",i,argv[i]);
printf("};\n\n");
*/
I am not sure it compiles with all compilers (if at all!).
Yup, it doesn't work. C block comments don't nest. Not an SciTE problem.
We are in a block comment, so within it, there is no syntax checking:
neither the lexer nor the compiler are able to see that the middle */ is
inside a C string...
So we fall in the "nested C comment" case, which is forbidden.
I usually comment out large portions of C code with
#ifdef DUMMY
[...]
#endif
just loosing the comment colour hint...
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest