-10^2
Richard Gaskin
ambassador at fourthworld.com
Wed May 21 18:41:00 EDT 2003
tom farrell wrote:
> Hi Richard et al...
>
>> You can force a specific order of operator precedence
>
> Yes, I understand. But I shouldn't have to use () if I want 4*2+5 to yield 13.
It does, at least in Transcript and MetaTalk.
> My apologies if this is off-topic, but I don't think -10^2 is
> ambiguous. Excel gets it wrong. Appleworks gets it right.
Maybe the larger question is: Is there a standard order for operator
precedence, and if so why so much variation?
My hunch is that there are conventions, perhaps somewhat loosely held and
maybe passionately argued, and little consistency of opinion.
As long as a language vendor publishes their order of precedence at least a
user can make an informed decision.
But as for parens, they're so helpful in turning merely readable code into
quickly skimmable code that I tend to use them far more often than required,
all the way down to IF statements, if only to help things stand out visual
in a block of code.
> Sadly, and based on complete ignorance alone, I assume that even if
> the the authors of, eg, OpenOffice or StarOffice know that Excel gets
> it wrong, they have made their products get it wrong also, for the
> sake of import/export consistency.
Reminds me of the fox terrier essay from Stephen Jay Gould's "Bully for
Brontosaurus" (ah, miss that guy...)
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge 2.2: Publish any database on any site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the use-livecode
mailing list