another question about finding duplicates

Andre Garzia andre at andregarzia.com
Sun Jan 27 14:01:46 EST 2008


Folks,

a really stupid way that also solves if the dupes are not adjacent:

put fld "my stuff" into tSourceData
put empty into tDestinyData

repeat for each line tEntry in tSourceData
   if tEntry is in tDestinyData then next repeat
   put tEntry & cr after tDestinyData
end repeat

This will process each line, putting them into another variable, if
the line is already there it will move to the next line. It might be
faster than Klaus approach since it is one loop only and less
commands. It may be better than the previous code with arrays because
your data can contain tabs with no problem without breaking some split
command.

Anyway, just my two Brazilian Real Cents (which are really cute but not worth)

Andre



More information about the use-livecode mailing list