Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Function to compare two scripts?

From: nitsch-lists:netcologne at: 23-Aug-2003 6:05

Gregg Irwin wrote:
>Hi Sunanda, > >Sac> I'd like to be able to compare two scripts (or any pair of newline-separated >Sac> text items) and get a block of the differences. > >Volker and I have each tackled this, but in different ways. I'm not >sure where his latest stuff is (Volker?), mine is included below. His >has a GUI front end; mine is just code-based. Got it working and it's >collected dust since then. Not polished, lots of "idea" stuff in there >cluttering things up, but maybe something you can use. >
Now on /developer in my folder. failed to understand it again :) Basically it works like this: while[lines left][ take the first line in the left text. find it in the right text. either found [ collect it and all following same lines. save it somewhere and remove both blocks. ][ collect lines until you find one in the right text save them somewhere ] ] do something usefull with the collected blocks.
>-- Gregg >
-Volker