valueDiff for arrays?
Bob Sneidar
bobsneidar at iotecdigital.com
Tue Aug 7 18:20:09 EDT 2018
I do stand corrected however, as I got the dgdata of a grid with 6 records, in the order they were added to the sql database, and then queried for. The keys are NOT in numerical order:
5
6
1
2
3
4
I have never wrapped my head around why that is!
Bob S
> On Aug 7, 2018, at 15:12 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> You can as I understand get the keys of an array, which returns a string, then sort the string. I am unaware of any function that can sort an array natively before it is returned.
>
> Bob S
>
>
>> On Aug 7, 2018, at 15:02 , Richard Gaskin via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> Bob Sneidar wrote:
>>
>>> Someone said, probably Mark, that numbered key arrays beginning with 1
>>> will always return their keys sorted numerically. I always wondered
>>> why almost every other array seemed to scramble to order of it's keys,
>>> but datagrid arrays never did.
>>
>> Associative arrays are a collection of hashes, and as such have no internal sense of order.
>>
>> The DataGrid script runs output through the sort command before returning it.
>>
>> --
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>
More information about the use-livecode
mailing list