another question about finding duplicates

Jim Ault JimAultWins at yahoo.com
Mon Jan 28 10:30:21 EST 2008


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 after tDupList  --new
> end repeat
   filter tDupList without empty --new
   put tDupList into field tError --new

I am not sure why the Rev IDE would less than its cheerful self after such a
simple loop.

Jim Ault
Las Vegas

On 1/27/08 11:19 PM, "Peter Alcibiades" <palcibiades-first at yahoo.co.uk>
wrote:

> 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:
> 
> 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&"*"
> if the number of lines in it >1 then  put it & CR after field tError
> end repeat
> 
> When run against a two hundred line file with one duplicate pair, the screen
> flickered for several seconds, after which it notified us of all four of
> them.  The IDE somehow did not seem quite his usual cheerful self after
> having got through this exercise.. ...
> 
> Peter





More information about the use-livecode mailing list