• 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: AppleScript-Users Digest, Vol 4, Issue 433
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 4, Issue 433


  • Subject: Re: AppleScript-Users Digest, Vol 4, Issue 433
  • From: "Stockly, Ed" <email@hidden>
  • Date: Tue, 04 Sep 2007 12:10:03 -0700
  • Thread-topic: AppleScript-Users Digest, Vol 4, Issue 433

set uniqueList to {}
repeat with x from 1 to count of origList
    if item x of origList is not in uniqueList then
        set the end of uniqueList to item x of origList
    end if

end repeat

> Which doesn't change the runtime, but does make it simpler to write.
>
> Don't get me started on the need to explicitly dereference elements
> obtained via "repeat with...in", though. :)

Probably faster because there is no need to dereference elements.

HTH
ES
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScript-Users Digest, Vol 4, Issue 433
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: FileMaker AppleScript question...
  • Next by Date: Re: AppleScript-Users Digest, Vol 4, Issue 433
  • Previous by thread: Re: Eliminating duplicate items from a list
  • Next by thread: Re: AppleScript-Users Digest, Vol 4, Issue 433
  • Index(es):
    • Date
    • Thread