|
|
Warp wrote:
> : You said it: it would open the door to needlessly confusing code.
>
> Why it would be confusing code?
>
> If I write: #if(a>0 & b>0)
> does it matter whether the part "b>0" is evaluated or not as long as the
> result is correct?
Yes, and besides, this is much clearer to me than
#if(a>0)
#if(b>0)
It's especially more clear when limiting to a set:
#if(a>0 & a<10)
because you don't need to read ahead or look at indentation to see that you're
limiting a to an interval (0,10) (or is that [0,10]?). Same goes for a
non-contigous set:
#if((a>0 & a<10) | a>20 | a=15)
Imagine that coded as individual tests!
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|