How to get the difference between two lists?

Frank D. Engel, Jr. fde101 at
Mon Apr 4 10:22:56 CDT 2005

Hash: SHA1

Okay, so anyone want to report on this one (untested, but should be 
rather efficient):

This algorithm assumes that every item in the exclusion list is 
included in the master list, that there are no duplicate items in 
either list, and that both lists are in ascending numeric order:

put empty into targetList
put (excludeList & cr & 100000000000000000) into eCopy  -- use some 
absurdly huge
             -- number, guaranteed to not be in either list, and to be 
larger than the largest possible
             -- number in either list
put 1 into z
repeat for each line x in masterList
   if x < (line z of eCopy) then put (x & cr) after targetList
   else add 1 to z
end repeat
delete the last char of targetList

On Apr 4, 2005, at 10:27 AM, Jim Hurley wrote:

>> Message: 6
>> Date: Sun, 03 Apr 2005 22:04:54 -0500
>> From: Ken Ray <kray at>
>> Subject: How to get the difference between two lists?
>> To: Use Revolution List <use-revolution at>
>> Message-ID: <BE761906.181CF%kray at>
>> Content-Type: text/plain;	charset="US-ASCII"
>> I've got two lists - one with is the "comprehensive" list that is
>> return-delimited, like:
>> (snip)
> Ken,
> I wrote a short stack (non-pancake) a short time ago to deal with the 
> multitude of e-mail list among the various volunteer groups in my 
> community, extract duplicates, find common lines, etc.
> It will generate the both the intersection and the union of any two 
> lists. Don't know if this is any help but you can see with
>       go url ""
> Jim
> _______________________________________________
> use-revolution mailing list
> use-revolution at
- -----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
Version: GnuPG v1.2.4 (Darwin)


$0 Web Hosting with up to 200MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at

More information about the use-livecode mailing list