static if syntax
BCS
ao at pathlink.com
Thu Jun 4 11:49:43 PDT 2009
Reply to Steve,
> If I write:
>
> static if (cond1)
> {
> ...
> }
> else static if (cond2)
> {
> ...
> }
> else
> {
> ...
> }
> is the block after the final else 'static'? Would it be better if the
> 'static' before the whole sequence of tests applied throughout rather
> than having to be explicitly restated in some places, but not in
> others?
>
> Steve
>
Whatever is used, both of these (and other variations) should be cleanly
and consistently representable.
static if(foo) { static if(bar) {} else {} }
else { static if(baz) {} else {} }
static if(foo) { if(bar) {} else {} }
else { if(baz) {} else {} }
More information about the Digitalmars-d
mailing list