Re: Faster List Checking
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.