• 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: minimum function?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minimum function?


  • Subject: Re: minimum function?
  • From: Rob Stott <email@hidden>
  • Date: Tue, 5 Apr 2005 21:46:24 +0100


On 5 Apr 2005, at 20:18, Jake Pietrykowski wrote:

Does anywhere exist a command for a minimum function? Where x is the
returned smallest number of the list {a,b,c}?

ex. x = min{a,b,c}


You could write your own handler, like this;

set x to minimumOf({9, 2, 3, 1, 4, 5, 6})


on theList)
set theAnswer to item 1 of theList
repeat with theNumber in theList
if theNumber < theAnswer then set theAnswer to theNumber
end repeat
return theAnswer as number
end minimumOf

Hope that's of some help.

r.


---

Rob Stott

"...an interesting game - the only way to win is not to play"
 _______________________________________________
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: 
 >minimum function? (From: Jake Pietrykowski <email@hidden>)

  • Prev by Date: Re: minimum function?
  • Next by Date: Re: minimum function?
  • Previous by thread: Re: minimum function?
  • Next by thread: Re: minimum function?
  • Index(es):
    • Date
    • Thread