Re: Math expression help
Re: Math expression help
- Subject: Re: Math expression help
- From: Emmanuel <email@hidden>
- Date: Wed, 10 May 2006 01:16:58 +0200
At 4:42 PM -0400 5/9/06, Dale J Martin wrote:
Can someone please explain this to me...... I have the expression in
one statement and it gives the wrong answer. After breaking it up I
get the answer is correct answer
That's because AppleScript's verbs are not functions, they are
commands - sorry for the pedantism. They don't care about parentheses
for the argument. What they do is: they evaluate the rest of the
expression on the right, then they run.
In other terms:
cos (x) * cos (y) * cos (z)
is *not* what you think. AppleScript computes that line as:
cos (x * cos (y * cos (z)))
So you do have to bracket such expressions in parentheses:
(cos x) * (cos y) * (cos z)
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden