Diff algorithm
Yves COPPE
yvescoppe at skynet.be
Wed Nov 5 01:57:38 EST 2003
Le mardi, 4 nov 2003, à 17:56 Europe/Brussels, Bill Vlahos a écrit :
If I understand well what you want, here is a very fast script to
compare two flds and return the lines in fld "one" that are not in fld
"two"
function DiffLines pList1, pList2
repeat for each line tLine in pList1
put 1 into tArray[tLine]
end repeat
repeat for each line tLine in pList2
if tArray[tLine] < 1 then
put 2 into tArray[tLine]
put tLine & cr after tRetVal
end if
end repeat
delete char -1 of tRetVal
return tRetVal
end DiffLines
hope that's what you want.
Greetings.
Yves COPPE
yvescoppe at skynet.be
More information about the use-livecode
mailing list