POV-Ray : Newsgroups : povray.general : feature request (regarding &,|) : Re: feature request (regarding &,|) Server Time
8 Aug 2024 16:16:43 EDT (-0400)
  Re: feature request (regarding &,|)  
From: David Fontaine
Date: 17 Nov 2000 18:57:54
Message: <3A15C595.691BF4BC@faricy.net>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.