Thread: Comments
View Single Post
  #3   Spotlight this post!  
Unread 18-01-2004, 21:40
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Comments

Quote:
Originally Posted by Astronouth7303
Question: Why doesn't anyone use single-line comments?

the /* */ doesn't nest.

Like:
Code:
//This is a one line Comment.

/* Commented_Out_Code();
 /* this is a multi-line
     Comment in Code */
 This_Code_Still_Executes(); */

/* Commented_Out_Code();
 // this is a multi-line
 // comment in code
 // split into single-line
 // comments
 This_Code_Dont_Execute(); // :ahh:  */
The reason I say this is that you can use /* */ for commenting out and debugging.

Isn't it good coding practice to do this anyway?

Plus, It isn't in the default code, Anywhere.
I have wondered the same thing. It gets quite annoying trying to comment out blocks of code that contain multiline comments.
__________________
1139 Alumni