• 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: Lowest value of list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: My operator can beat up your operator.
  • Next by Date: Re: Lowest value of list
  • Previous by thread: Lowest value of list
  • Next by thread: Re: Lowest value of list
  • Index(es):
    • Date
    • Thread