Re: minimum function?
Re: minimum function?
- Subject: Re: minimum function?
- From: jj <email@hidden>
- Date: Tue, 05 Apr 2005 21:53:22 +0200
> Hi,
>
> 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}
>
> Thanks,
> Jake
There is "statlist" inside Satimage osax:
#################################
minimum of (statlist {5, 4, 2, 6}) --> 2.0
#################################
http://www.satimage.fr/software/en/downloads_osaxen.html
You can also loop through the list (depending on the length of the list, it
will be faster using Satimage):
#################################
set theList to {5, 4, 2, 6}
set min to 2 ^ 512 --> very high value
repeat with i from 1 to count theList
if theList's item i < min then set min to theList's item i
end repeat
min --> 2
#################################
jj
--
http://www.macscripter.net/
http://www.osaxen.com/
_______________________________________________
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