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!).
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...

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest

Reply via email to