Re: compiler error

From: Daniel A. Koepke (
Date: 08/12/99

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

> 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

> Even if you "correctly" nest comments (/* blah /* blah2 */ */) it will
> complain loudly.

You can't correctly nest comments.  (Yes, I know: Hence, the quotation


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST