-10^2 (OT)

Victor Eijkhout eijkhout at cs.utk.edu
Thu May 22 11:46:00 EDT 2003


>  >Maybe the larger question is:  Is there a standard order for operator
>>precedence, and if so why so much variation?
>
>There is from a mathematician's point of view.  What happened to all you
>guys' high school math?

That's the programmers' disease of never doing research, just start 
hacking, and reinvent the wheel on the fly. It's depressingly common.

>  -10^2
>should always give you -100.

The only ambiguity would be as someone said 4/2*2.

Btw, APL is consistent in right-to-left evaluation, so 4/2*2 is 1. 
I'm not sure if -2+2 would be -4 in APL. It's been too long.
-- 
Victor Eijkhout <eijkhout at cs.utk.edu>, 329 Claxton, Comp Sci, UT, 
Knoxville TN 37996.
tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
http://www.cs.utk.edu/~eijkhout/



More information about the use-livecode mailing list