Nested array comparisons
Alex Tweedly
alex at tweedly.net
Sun Mar 24 19:53:45 EDT 2013
OK, let's just test it - focusing on the likelihood that key order matters
Code:
> on mouseup
> local T1, T2
> local tK, j
>
> constant K = 10
> repeat with i = 1 to K
> put random(i) into t1[i]
> end repeat
>
> put the keys of T1 into tK
> repeat with i = K down to 1
> put line i of tK into j
> put T1[j] into T2[j]
> end repeat
>
> put "array" && (T1 = T2) & CR & "code" && (arrayencode(t1) is
> arrayencode(t2)) \
> &CR & arrayencode(t1) &CR&CR & arrayencode(t2)
> end mouseup
Result:
> array true
> code false
>
More information about the use-livecode
mailing list