nested comments

2011-05-30 Thread %u
what is the purpose of nested comments ?

Re: nested comments

2011-05-30 Thread Adam D. Ruppe
I use them when commenting out code or when writing documentation examples. (which may have comments nested inside the doc comment) Commenting out code is the purpose in general though.

Re: nested comments

2011-05-30 Thread Jonathan M Davis
On 2011-05-30 14:21, Adam D. Ruppe wrote: > I use them when commenting out code or when writing documentation > examples. (which may have comments nested inside the doc comment) > > Commenting out code is the purpose in general though. Yeah, it's really annoying to comment out code with /* */ whe

Re: nested comments

2011-05-30 Thread %u
commenting out code?? example please

Re: nested comments

2011-05-30 Thread Timon Gehr
> commenting out code?? example please /+ /* this is code: */ int more_code; // more code code(more_code+even_more_code(1321)); +/

Re: nested comments

2011-05-30 Thread %u
I understand it thanks

Re: nested comments

2011-05-30 Thread Jesse Phillips
%u Wrote: > what is the purpose of nested comments ? The purpose is commenting out code, but note that there is also version(none) { } which is never compiled in.

Re: nested comments

2011-05-30 Thread bearophile
Jesse Phillips: > The purpose is commenting out code, but note that there is also version(none) > { } which is never compiled in. version(none) {} is probably the official way to comment out code. And if you use a versioning system to keep your code, then commenting out code is not a so wise th

Re: nested comments

2011-05-30 Thread Nick Sabalausky
"bearophile" wrote in message news:is1dj6$ihb$1...@digitalmars.com... > Jesse Phillips: > >> The purpose is commenting out code, but note that there is also >> version(none) { } which is never compiled in. > > version(none) {} is probably the official way to comment out code. > And if you use a

Re: nested comments

2011-05-30 Thread Jonathan M Davis
On 2011-05-30 17:43, bearophile wrote: > Jesse Phillips: > > The purpose is commenting out code, but note that there is also > > version(none) { } which is never compiled in. > > version(none) {} is probably the official way to comment out code. > And if you use a versioning system to keep your co

Re: nested comments

2011-05-30 Thread Ary Manzana
On 5/31/11 7:58 AM, Nick Sabalausky wrote: "bearophile" wrote in message news:is1dj6$ihb$1...@digitalmars.com... Jesse Phillips: The purpose is commenting out code, but note that there is also version(none) { } which is never compiled in. version(none) {} is probably the official way to com

Re: nested comments

2011-05-30 Thread bearophile
Jonathan M Davis: > What _is_ a bad idea is leaving in sections of commented out code when you > check in code.< Right, that's what I meant. Commenting out parts is fine while you are fixing or writing code. Bye, bearophile

Re: nested comments

2011-05-30 Thread Jonathan M Davis
On 2011-05-30 18:52, Ary Manzana wrote: > On 5/31/11 7:58 AM, Nick Sabalausky wrote: > > "bearophile" wrote in message > > news:is1dj6$ihb$1...@digitalmars.com... > > > >> Jesse Phillips: > >>> The purpose is commenting out code, but note that there is also > >>> version(none) { } which is never

Re: nested comments

2011-05-30 Thread Nick Sabalausky
"Ary Manzana" wrote in message news:is1hsa$p53$1...@digitalmars.com... > On 5/31/11 7:58 AM, Nick Sabalausky wrote: >> "bearophile" wrote in message >> news:is1dj6$ihb$1...@digitalmars.com... >>> Jesse Phillips: >>> The purpose is commenting out code, but note that there is also versio

Re: nested comments

2011-05-30 Thread Jonathan M Davis
On 2011-05-30 19:53, Nick Sabalausky wrote: > "Ary Manzana" wrote in message > news:is1hsa$p53$1...@digitalmars.com... > > > On 5/31/11 7:58 AM, Nick Sabalausky wrote: > >> "bearophile" wrote in message > >> news:is1dj6$ihb$1...@digitalmars.com... > >> > >>> Jesse Phillips: > The purpose i

Re: nested comments

2011-05-31 Thread Jose Armando Garcia
On Mon, May 30, 2011 at 11:58 PM, Jonathan M Davis wrote: > On 2011-05-30 19:53, Nick Sabalausky wrote: >> "Ary Manzana" wrote in message >> news:is1hsa$p53$1...@digitalmars.com... >> >> > On 5/31/11 7:58 AM, Nick Sabalausky wrote: >> >> "bearophile"  wrote in message >> >> news:is1dj6$ihb$1...@d

Re: nested comments

2011-05-31 Thread Steven Schveighoffer
On Mon, 30 May 2011 20:43:18 -0400, bearophile wrote: Jesse Phillips: The purpose is commenting out code, but note that there is also version(none) { } which is never compiled in. version(none) {} is probably the official way to comment out code. And if you use a versioning system to kee

Re: nested comments

2011-05-31 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vwcxmwfgeav7ka@localhost.localdomain... > On Mon, 30 May 2011 20:43:18 -0400, bearophile > wrote: > >> Jesse Phillips: >> >>> The purpose is commenting out code, but note that there is also >>> version(none) { } which is never compiled in. >> >>

Re: nested comments

2011-05-31 Thread Jonathan M Davis
On 2011-05-31 18:03, Nick Sabalausky wrote: > "Steven Schveighoffer" wrote in message > news:op.vwcxmwfgeav7ka@localhost.localdomain... > > > On Mon, 30 May 2011 20:43:18 -0400, bearophile > > > > wrote: > >> Jesse Phillips: > >>> The purpose is commenting out code, but note that there is also