EnTerr
14 years agoRoku Guru
How to clone roAssociativeArray?
Say i have dictionary (assoc.array) aa and want to copy it to bb but so that my further mucking with bb does not affect the original aa (thus just assigning the reference as bb=aa won't do). I looked fore clone() or copy() method but none such. So how is it done? All i can think of is unrefined, exploiting that roAssociativeArray implements ifEnum:
bb = {}
for each key in aa:
bb[key] = aa[key] 'shallow copy
end for