POV-Ray : Newsgroups : povray.beta-test : Small bug, asking for someone to check on latest RC : Re: Small bug, asking for someone to check on latest RC Server Time
29 Jul 2024 16:21:15 EDT (-0400)
  Re: Small bug, asking for someone to check on latest RC  
From: Wolfgang Thaller
Date: 29 May 2002 04:51:35
Message: <3cf49697@news.povray.org>
> Which would render (x*-y) illegal, of course...

Not necessarily. Depends on implementation.

As the ^-operator is a new feature (it's _not_ in 3.1, so it has _not_
always worked this way in POV-Ray), I would strongly hope that this is fixed
before the final release (that is before people start relying on strange
behaviour).

I've taken a look at express.c from the 3.1 source code.
I don't know where exactly the ^-operator has been added, but I see that
it's not to easy, but definitely possible, to implement cleanly. A new
function will probably have to be added in order to give unary - just
slightly lower precedence than exponentiation.
If this is not fixed by the release for 3.1, a warning should be placed in
the manual
(by the way: the ^-operator seems to be missing from the manual). People
should be told not to rely on this, so that it can be changed if the parser
is rewritten one day. It would be a pity for the PovRay SDL to be "locked"
in to some non-standard behaviour.

Cheers,

Wolfgang Thaller


Post a reply to this message

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