POV-Ray : Newsgroups : povray.beta-test : Small bug, asking for someone to check on latest RC Server Time
29 Jul 2024 14:15:12 EDT (-0400)
  Small bug, asking for someone to check on latest RC (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Wolfgang Thaller
Subject: Re: Small bug, asking for someone to check on latest RC
Date: 29 May 2002 04:07:27
Message: <3cf48c3f$1@news.povray.org>
"Josh Seagoe" <jos### [at] smileyfacecom> wrote:

> x+++---y is legal: (x++)+(-(--y))
It isn't: (x++)+(--(-y))  // that's what my compilers say, they could be
wrong :-)

> But this is insanely easy to work around, so it's not very important.

It's insanely easy to work around _if_ you know it. It's insanely difficult
to spot if you are expecting standard behaviour and don't know where the bug
is.

Cheers,

Wolfgang Thaller


Post a reply to this message

From: Wolfgang Thaller
Subject: Re: Small bug, asking for someone to check on latest RC
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

<<< Previous 10 Messages Goto Initial 10 Messages

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