valueDiff for arrays?

Richard Gaskin ambassador at fourthworld.com
Sun Aug 5 15:25:26 EDT 2018


Brian Milby wrote:

 > I think Mark's code had a typo (left returned too many keys), but even
 > when corrected it takes half the time as a pure LCS solution.  Here's
 > my modification:
 >
 > function bwmValueDiff pLeft, pRight
 >    local tResult
 >    intersect pLeft with pRight into tResult["1"]
 >    repeat for each key tKey in tResult["1"]
 >       if pLeft[tKey] is pRight[tKey] then
 >          delete variable tResult["1"][tKey]
 >       end if
 >    end repeat
 >    intersect pRight with tResult["1"] into tResult["2"]
 >    return tResult
 > end bwmValueDiff

That looks like LCS.  What is the "pure LCS solution" you were comparing 
it to?

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list