We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello Forum, I wanna use nesting comments with µvision/C166. How to enable them? It is really annoying to work without them. Thanks - Peter N.B.: Nesting comments means something like this: /* bla bla /* This is bla */ blub blub */ All of this is a comment. Without nesting comments the comment would end just before "blub blub" and the second "*/" would end up with an error.
Many compilers support such nesting of comments, and usually have an option to enable or disable it. Probably, the facility is more common in "bigger" compilers; eg MSVC, BCB. C51 doesn't support it, either. :-( Perhaps you could try using the Borland or MS preprocessor, and compile the result with C166. A common reason for using it is when commening-out a block of code; eg,
/* disabled code x = 1; /* Blah */ y = 2; /* Waffle */ z = f( x, y ); /* Tripe */ */
#if 0 x = 1; /* Blah */ y = 2; /* Waffle */ z = f( x, y ); /* Tripe */ #endif
Thanks for the nesting comments example.