|
|
In article <mj1bos4rmn9url4dp0shdmegjdron19h8b@4ax.com> , Peter Popov
<pet### [at] usanet> wrote:
>> Is there a reason for the operator & having higher precedence than + or -
>>in isosurface functions?
>
> Well, for me & has always meant binary 'and' or binary multiplication.
> As such I find it logical for it to have a higher precedence than
> addition. Your mileage may vary but that largely depends on the
> programming languages you're most comfortable with :)
No, both, binary and logical and should have lower precedence. If it is
binary it could at most have the same precedence to make any sense at all.
If you look at various programming languages you will find that all current
ones obey the rules set by mathematics.
As for binary operations, I think a dot=and, a plus=or and a line above=not
are very common or even standard. In this case a 'and' has higher
precedence, but this has little to do with general math and is not related.
The & sign in isosurfaces is obviously the equivalent of the inverted-V, and
thus it should have lower precedence. As for the not inverted-V, the '|'
(or-sign), I am not sure about the current implementation, but is should
also have lower precedence.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|