Hello, 

After comparing two lists and finding the matches, I have placed them in
a new list. The new list now has duplicates of the same item. I need to
get rid of all the duplicates. This is what I have so far. Shouldn't
this work?
I'm getting an Index out of range error?

  nItemsInListA = count(matchList)
  matchlist.sort()
  repeat with i = 1 to nItemsInListA -1
    
    itemFromML1 = matchlist[i]
    itemFromML2 = matchlist[i +1]
    
    
    first = getOne(matchList, itemFromML1)
    Sec = getOne(matchList, itemFromML2)
    
    if first = Sec then
      matchList.deleteAt(itemFromML2)
    end if

  end repeat  

Thanks,
~Matt



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to