Re: Lowest value of list
Re: Lowest value of list
- Subject: Re: Lowest value of list
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 14 May 2003 13:20:35 -0700
On 5/14/03 1:03 PM, "Steve Suranie" <email@hidden> wrote:
>
I have a list which will vary in number of items which themselves will be
>
numbers {"80565432", "56420123", "76492914", 53020442"} - is there a way to
>
determine which item in the list has the lowest numerical value?
set theList to {"80565432", "56420123", "76492914", "53020442"}
set lowestItem to item 1 of theList
repeat with i from 1 to (count theList)
set theItem to item i of my theList
if (theItem as number) < (lowestItem as number) then
set lowestItem to theItem
end if
end repeat
--> "53020442"
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.