• 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: Faster List Checking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faster List Checking


  • Subject: Re: Faster List Checking
  • From: Steven Angier <email@hidden>
  • Date: Thu, 29 May 2003 08:56:31 +1000

On Thursday, May 29, 2003, at 07:15 AM, Andrew Oliver wrote:

Since you only care if graphic appears in the errorList, you can say:

if errorList contains graphic then
set knownerror to "YES"
end if

This eliminates the need to delimit the string, walk the loop, etc., etc.

It's worth noting generally that using text item delimiters to test the existence of one string within another is faster than using "contains" on a list -- especially on long lists -- even when considering case, "contains" is slower.


Steven Angier
Macscript.com
_______________________________________________
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.

References: 
 >Re: Faster List Checking (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: erasing a file or folder
  • Next by Date: Re: erasing a file or folder
  • Previous by thread: Re: Faster List Checking
  • Next by thread: RE: Faster List Checking
  • Index(es):
    • Date
    • Thread