Nested array comparisons

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Mar 24 16:29:37 EDT 2013


Dick,

As you can conclude from

"To compare two arrays, simply use the = operator directly on them 
rather than encoding them first."

the documenation, particularly with regard to arrays, is not always correct.

Moreover, I would expect that computers return the same value when doing 
two equal calculations in the same way under equal circumstances.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

We have time for new software development projects. Contact me for a quote.

On 3/24/2013 21:25, Dick Kriesel wrote:
> On Mar 24, 2013, at 1:02 PM, Monte Goulding <monte at sweattechnologies.com> wrote:
>
>> I know the list of keys is not random but there's no guarantee on the order as far as I know and I'd want to do a significant amount of testing before I assume two arrays created under different circumstances might return the keys in the same order.
>
> The dictionary entry for arrayEncode says two equal arrays may have different array encodings:
>
> "Note: Arrays in LiveCode are un-ordered. This means in particular that encoding two arrays will not necessarily produce the same result, even if the arrays had the same elements. To compare two arrays, simply use the = operator directly on them rather than encoding them first."
>
> -- Dick




More information about the use-livecode mailing list