(Non) Nesting block comments
Michel Fortin
michel.fortin at michelf.com
Tue Jul 21 04:54:19 PDT 2009
On 2009-07-21 05:31:13 -0400, Michiel Helvensteijn
<m.helvensteijn.remove at gmail.com> said:
> Robert Jacques wrote:
>
>> Well /* */ are excellent for toggling code sections. I tend to use
>> constructs such as // */ or //* or /*/ which allows me to turn on of off
>> blocks with often a single key stroke. Using /+ +/ means I have to Add
>> /++/ and remove /++/ each time I want to activate or deactivate a code
>> block.
>
> Why? I believe that /++/ works exactly like /**/ in that regard. Doesn't it?
>
> //+
> code that can be turned off by removing the first /
> //+/
I'm pretty sure he meant comment out a signle line at the top, not
both, like this:
/*
A
/*/
B
/**/
With this, you compile B while A is in a comment. Add "/" at the start
of the first line and you compile code A while B is now in commented
out.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list