keeping keys of an array in the order they came in?

Klaus major-k klaus at major-k.de
Sat Aug 19 09:44:11 EDT 2017


Hi Mike,

I added a little IF THEN clause to avoid doublettes in the ney key, too,
and now it does what I need, thanks again!

> Am 19.08.2017 um 15:12 schrieb Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> put empty into tArray
>> repeat for each line tLine in tData
>> put item 2 of tLine into tKey
>> if tKey = EMPTY then next repeat
>> put tLine & CR after tArray[tKey]

if lineoffset(tKey,tArray["keylist"]) = 0 then
 put tKey & CR after tArray["keylist"]
end if

>> ## put tKey & cr after tarray['myKeyList']
>> end repeat

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list