Phil Davis wrote:

> Hey Richard,
>
> Wouldn't it give more accurate results to compare arrays without
> encoding them, rather than comparing the encoded arrays? Isn't
> encoded string way roughly 100% likely to be 'not equal'?

Is it?

Modifying my code to come up with examples using different algos, I was able to get a "true" in my routine.

Two benefits of arrayEncode there are that it makes the output visible, so you can see (at least roughly) how they're different, and it lets us get a length for the array data, which can be helpful given that many things in LC's binary encoded array format will display as non-printing characters (numbers, for example, as stored in binary form).

Now that = can be used to recursively compare arrays that may not be a bad option, or even better to translate the output to JSON for even better visibility.

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

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to