Diff algorithm

Richard Gaskin ambassador at fourthworld.com
Tue Nov 4 02:21:20 EST 2003


Anyone implement a diff algorithm in xTalk?

My goal is to compare the words in two blocks of text and output a combined
block of text showing words present in the first block but absent in the
second ("deleted") in red with a strikeout, and words present in the second
but absent from the first ("added") in blue.

This is one of those things that seems simple enough, yet in looking at the
various algorithms floating around the Web apparently it is not.  I had a
version that kinda worked on lines but only kinda, so here I am....

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc



More information about the use-livecode mailing list