POV-Ray : Newsgroups : povray.general : trace() function feature req : Re: trace() function feature req Server Time
13 Aug 2024 03:23:12 EDT (-0400)
  Re: trace() function feature req  
From: Dan Connelly
Date: 19 Nov 1998 18:59:26
Message: <3654B0CB.BFF188F2@flash.net>
This is a good idea.  The simplest generalization would be
for a vector to have its components logically or'ed when used
in a boolean context.... I don't know how distributed through 
the code is the logical evaluation of parameters, but I suspect
this could be done in a compact fashion (wherever the error is generated,
a conversion could be done instead).

Dan


Ron Parker wrote:
> 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.

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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