Loop through Multi-Dimensional Array

BNig niggemann at uni-wh.de
Mon Jun 21 14:38:48 EDT 2010


Andrew,

the element gives you the content but apparently not the key of the record.
For me:
put pNewName into tLeaseData[x][i] 
creates a new subrecord that has the key pOldName and the content pNewName

I tried this and it seems to work

-------------------------
 repeat with x=1 to the number of elements in tleaseData
      put the keys of tleaseData[x] into tSubKeys
      repeat for each line aSubKey in tSubKeys
         if tLeaseData[x][aSubKey] is pName then
            put pNewName into tLeaseData[x][aSubKey]
            put true into tleaseData[x]["Changed"]
         end if
      end repeat
   end repeat
----------------------------------
there might be other ways to tackle this.
regards 
Bernd
-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Loop-through-Multi-Dimensional-Array-tp2262924p2263138.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list