Skip to content
Prev 371219 / 398532 Next

[FORGED] Re: Block comment?

On 03/09/2017 12:49 AM, Rolf Turner wrote:
Those aren't nestable.  You can have as many opening /* sequences as you 
like, and the first */ will close the comment.  The usual recommendation 
for nestable comments in C++ is to use #if 0 ... #endif, a lot like 
Uwe's suggestion.  (Since this is a preprocessor command, what falls 
between the markers doesn't need to be legal C++, but it does need to be 
legal preprocessor markup.)
A shorter version:  just put # at the start of every line in the block.
That's nestable, but if you mess up the nesting, it's still completely 
obvious what is commented out and what is not.

Duncan Murdoch