POV-Ray : Newsgroups : povray.unofficial.patches : Why & has higher precedence than + or - in isosurface functions? : Re: Why & has higher precedence than + or - in isosurface functions? Server Time
2 Sep 2024 06:18:41 EDT (-0400)
  Re: Why & has higher precedence than + or - in isosurface functions?  
From: Warp
Date: 2 Aug 2000 05:13:18
Message: <3987e62d@news.povray.org>
Peter Popov <pet### [at] usanet> wrote:
: I don't know why, it's just that when I see logic operators I think
: it's reasonable for them to expect boolean operands (promoted to
: boolean if needed). And with that in mind, I expect multiplication to
: have a higher precedence than addition, regardless of context.

  & and | are not boolean operators. The are set theory operators.

  When you write: function { x & y }
you are actually saying:

  x<0 AND y<0

not something like:

  (x LOGICAL_AND y) < 0

which makes little sense.

  What is (0.5 LOGICAL_AND -2.8)?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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