Nested array comparisons
m.schonewille at economy-x-talk.com
Sun Mar 24 16:29:37 EDT 2013
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.
Economy-x-Talk Consulting and Software Engineering
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