POV-Ray : Newsgroups : povray.general : trace() function feature req : Re: trace() function feature req Server Time
13 Aug 2024 03:20:03 EDT (-0400)
  Re: trace() function feature req  
From: Ron Parker
Date: 19 Nov 1998 10:50:50
Message: <36543e5a.0@news.povray.org>
On Thu, 19 Nov 1998 01:05:16 GMT, Ronald L. Parker <par### [at] mailfwicom> wrote:
>On Wed, 18 Nov 1998 18:00:06 -0600, Dan Connelly <djc### [at] flashnet>
>wrote:
>
>>> ...Opinions on this, especially
>>> from people who are using the rather bizarre current semantics,
>>> are welcome.
>>
>>Since "=" is a float operator, and since float operations are
>>operated over each element of a vector (for example,
>><1, 2, 3> * 4), the current implementation makes sense.
>
>It's consistent, yes, but surely you can't argue with a
>straight face that it makes sense.  I think it'd be nice
>to compare two vectors without having to muck with macros
>(which incur a biggish parsing penalty)

Even the official documentation says "Admittedly this isn't very useful but 
its consistent with other vector operations."

I failed to mention the other point I wanted to make, which is that I'm 
proposing only to change the behavior in a case that is currently a syntax 
error.  Someone using the code you posted to demonstrate this feature would 
still get the same results.  Someone doing "#if (mynormal=0)" would get what 
they expect instead of a syntax error saying that a float value was expected.
If someone did

  #declare mybool=(mynormal=0);
  #if (mybool) 

it wouldn't work (mybool would be a vector, despite its name) but the obvious
way of doing it would now work and with much less work (for both the script
writer and the parser) than the way it has to be done now.


Post a reply to this message

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