|
|
Scott Hill wrote:
> No ! 5.
>
> That's the point - we and parsers all assume, because we've all learned
> (or, in the case of parsers, have been hard coded with) the correct operator
> ordering, that it evaluates to 3, but, I may not have meant that, I could
> just as easily meant ((1+2)*3)-4 ! Without brackets it is ambiguous, to a
> degree - we may default to assuming that we're meant to follow the standard
> operator order rules but we don't and can't know that that assumption is
> correct.
NO!! 1+2*3-4 is three, only three, exactly three, no more, no less, and most
certainly not and NEVER five. If you meant (1+2)*3-4, that would be analagous to
me typing orange and meaning purple. Anyone who types 1+2*3-4 and expects 5 is
an idiot.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|