Re: another question about finding duplicates

2008-01-28 Thread Jim Ault
I would eliminate the screen flicker and improve speed by doing this > set the itemDelimiter to tab > put field tData into tmp > repeat for each line theLine in field tData >put item 1 of theLine into tagg >get tmp >filter it with tagg&tab&"*" put line 2 of it & CR

another question about finding duplicates

2008-01-27 Thread Peter Alcibiades
Thanks everyone, what's amazing is how you can solve the problem by such completely different approaches. My own approach was best thought of as an attempt at the new literary genre of "programming jokes" and has the same relation to the others as PDQ Bach has to music. Here is it is:

Re: another question about finding duplicates

2008-01-27 Thread Ken Ray
On Sun, 27 Jan 2008 17:01:46 -0200, Andre Garzia wrote: > 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. True on both counts, bu

Re: another question about finding duplicates

2008-01-27 Thread Mark Smith
Andre, 'split' won't get upset by other tabs (or whatever itemDelimiter) in the data. If you , the array will simply have the first item of each line as keys, and item 2 to -1 of each line as the contents. Best, Mark On 27 Jan 2008, at 19:01, Andre Garzia wrote: It may be better than

Re: another question about finding duplicates

2008-01-27 Thread Andre Garzia
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 proce

Re: another question about finding duplicates

2008-01-27 Thread Mark Smith
Sorry, delimiters wrong way round! put tData into testData split testData by cr and tab if the number of lines in the keys of testData <> the number of lines in tData then thereAreDupes ___ use-revolution mailing list use-revolution@lists.runrev.co

Re: another question about finding duplicates

2008-01-27 Thread Mark Smith
Peter, this is not tested: put tData into testData split testData by tab and cr if the number of lines in the keys of testData <> the number of lines in tData then thereAreDupes Best, Mark On 27 Jan 2008, at 12:33, Peter Alcibiades wrote: There's a file which goes roughly: 1 anythi

Re: another question about finding duplicates

2008-01-27 Thread jbv
Peter, I've tried that approach and found that in case of huge amount of data, it can beslower (because of the sort function) that the method posted before, the one including 2 loops and the use of arrays. JB > There's a file which goes roughly: > > 1 anything > 2 anything > 3

Re: another question about finding duplicates

2008-01-27 Thread Klaus Major
Hi Peter, There's a file which goes roughly: 1 anything 2 anything 3 anything 4 anything etc It can always be sorted by the first item. Sometimes a duplicate entry will creep in, so the file will look 1 anything 2 anything 2 anything 3 anyt

another question about finding duplicates

2008-01-27 Thread Peter Alcibiades
There's a file which goes roughly: 1 anything 2 anything 3 anything 4 anything etc It can always be sorted by the first item. Sometimes a duplicate entry will creep in, so the file will look 1 anything 2 anything 2 anything 3 anything 4 an