At 09:07 PM 8/12/99 -0700, you wrote: >On Aug 13, Chris Proctor spake to the list: > > > The "/* within comment" error in my experience has been due to an > > attempt to nest comments. > >Yes, but if you eliminate a "*/" then everything after the beginning of >that unclosed comment is part of the comment. Thus, you nest comments >accidentally ("... /* bllahh */^H^H ... /* Blah */" == error). Don't you get the same kinds of errors if you nest comment as if you miss a */? > > The most common reason for me doing this myself is commenting out a > > swathe of code that I'm rewriting, and not noticing there's a comment > > within the swathe. > >You shouldn't comment out large blocks of code anyway. Put in conditional >compilation constructs to have the preprocessor ignore it: > > #if 0 > . > . > . > #endif Well I'll be. Always wanted to know how to do that ;-) > > Even if you "correctly" nest comments (/* blah /* blah2 */ */) it will > > complain loudly. > >You can't correctly nest comments. (Yes, I know: Hence, the quotation >marks.) Yep. The correctness thing should be interpreted as "if you logically pair comment open and comment closes the compiler will still complain loudly". Regards, Chris Proctor (Deathblade, Implementor of DominiaMUD) MUD Homepage: http://www.labyrinth.net.au/~cjp +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST