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
|