www.digitalmars.com         C & C++   DMDScript  

D - Comments!

reply "Andrew Edwards" <crxace13 comcast.net> writes:
I don't now why (yet), but I wondering if there's a way to comment "in" a
piece of code?

e.g. /+ Could there be possible value in having something like this /-
printf("This would print")-/ in your code? +/
Jun 15 2002
parent "anderson" <anderson firestar.com.au> writes:
Don't quite understand or see the benefit of this.

If code has been commented out, then you comment it in by removing the
comment symbol.

For the example you gave, why not

Comment Out
e.g.
/* Could there be possible value in having something like this
printf("This would print");  in your code? */

Comment in
e.g.
/* Could there be possible value in having something like this */
printf("This would print"); /* in your code? */

Alternatively
Comment Out
e.g.
//Could there be possible value in having something like this
//printf("This would print"); // in your code?

Comment in
e.g.
/* Could there be possible value in having something like this */
printf("This would print"); // in your code?

Multi-lined
Comment Out
e.g.
// Could there be possible value in having something like this
/* printf("This would print") // in your code?
printf("This would print") // in your code? */

Comment in
e.g.
// Could there be possible value in having something like this
printf("This would print") // in your code?
printf("This would print") // in your code? */

(or you could use D nesting comments)

You still would only have to remove the same amount to comment in code and
this already exist.

"Andrew Edwards" <crxace13 comcast.net> wrote in message
news:aefb6s$2nod$1 digitaldaemon.com...
 I don't now why (yet), but I wondering if there's a way to comment "in" a
 piece of code?

 e.g. /+ Could there be possible value in having something like this /-
 printf("This would print")-/ in your code? +/
Jun 15 2002