Re: Sifting a list sans loop
Re: Sifting a list sans loop
- Subject: Re: Sifting a list sans loop
- From: Arthur J Knapp <email@hidden>
- Date: Mon, 28 Jan 2002 10:15:04 -0500
>
Date: Sat, 26 Jan 2002 20:43:13 -0600
>
From: ehsan saffari <email@hidden>
>
Subject: Sifting a list sans loop
>
I have many lists of 2000-5000 items.
>
In each list each item is either a list or a string.
>
I need to discard the lists and keep the strings for further processing.
-- Here you go:
--
set newList to every string of bigList
This works for almost any AppleScript type-class. One word
of caution: for a list of 5000 items, you might run into
AppleScript's upper limit for returning a list, approx 4050
some items or so:
if ( count of strings in bigList = 5000 ) then
set newList to every string of bigList
--
--> error "Memory overflow..."
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.seanet.com/~jonpugh/>
on error number -128
end try
}