valueDiff for arrays?

Brian Milby brian at milby7.com
Sat Aug 4 22:11:19 EDT 2018


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


On Sat, Aug 4, 2018 at 9:01 PM, Mark Wieder via use-livecode <
use-livecode at lists.runrev.com> wrote:

> On 08/04/2018 04:45 PM, Mark Waddingham via use-livecode wrote:
>
> The other place this could come to bear is making the S/B (or some variant
>> there-of) not only work to produce an application, but also a
>> 'component/extension' - i.e. a distributable 'compiled' (in some sense)
>> form of a collection of script only stacks which were much more easily
>> distributable.
>>
>
> Hmmm... a 'bundle' of script-only stacks as a text file, especially if I
> could attach it as a substack is very appealing. This is certainly a need
> for stacks I distribute as stacks... for example, you can't use revOnline
> for script-only stacks or for LCB code.
>
> Hehe - well it is a working day for me today, and tomorrow and the next
>> week - I'm currently in Dallas, Texas, for FileMaker DevCon.
>>
>
> My condolences <g>
>
> --
>  Mark Wieder
>  ahsoftware at gmail.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list