• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Math expression help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Math expression help (From: Dale J Martin <email@hidden>)

  • Prev by Date: Re: Math expression help
  • Next by Date: Re: Math expression help
  • Previous by thread: Re: Math expression help
  • Next by thread: Re: Math expression help
  • Index(es):
    • Date
    • Thread