Re: minimum function?
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