(Non) Nesting block comments
Michel Fortin
michel.fortin at michelf.com
Tue Jul 21 04:54:18 PDT 2009
On 2009-07-20 23:51:42 -0400, "Robert Jacques" <sandford at jhu.edu> said:
> 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.
I'd say that this is a much better way for activating/deactivating code
by from a single point in your file:
version = NewStuff; // comment this out to do old stuff instead.
version (NewStuff) {
...
} else {
...
}
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list