Another variation on a theme...
on removeDuplicates vlist
sort vlist
repeat with i = count(vlist) down to 2
if vlist[i] = vlist[i-1] then vlist.deleteAt(i)
end repeat
end
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cg
No need to sort version:
on deletedups aList
retlist=[]
repeat while aList.count()
aItem = aList[1]
add(retList,aList[1])
aList.deleteAt(1)
repeat while aList.getOne(aItem)
aList.deleteOne(aItem)
end repeat
end repeat
return retList
end
_
Stephen Ingrum wrote
start with a sorted list
sort(aList)
then use something like
on deletedups aList
retlist=[]
cnt=count(aList)
repeat with i=1 to cnt
if not (inList(aList[i],retList)) then
add(retList,aList[i])
end if
end repeat
return retList
end
on inlist aItem, ali