Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Commenting code

Status
Not open for further replies.

developer155

Programmer
Jan 21, 2004
512
US
I am having a problem commenting a large chunk of code using /**. When I put the closing **/ at the end of the chunk, the code is not commented. I am guessing that this is because inside the code there are /**...**/ as well, but I do not want to change any code in that chunk, do not want to delete any comments. What shoudl I do

thanks!!!
 
Are you doing this by hand?
You may break the nested comments by replacing the */ with
* /
Or you put every embedded comment in // line-comments.

If the code doesn't contain any * / until now, the first solution might be undone with not too much work.
*TEMP_DISABLED/ might help if some comment-ends are disabled right now.

But generaly spoken, nested comments aren't supported.
 
Enclose the code that you wish to comment, as follows:

if (false) {
Block of code to 'comment'
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top