Re: Referencing Nested Sequences
- Posted by Igor Kachan <kinz at peterlink.ru> Jun 07, 2003
- 505 views
Hello pblonner: > I am new to Euphoria but find it an exciting language. Welcome! > One point that bothers me however > is as follows - to access a sequence > nested in a sequence you must make the full > "path" reference each time if you are to change > any values. You can not simply copy a reference > to the inner sequence - otherwise a > copy of the entire sequence would be made. > > e.g for i = 1 to 10 do > nested[9][3][i] = 0 > end for > > if it done as > SubList = nested[9][3] > for i = 1 to 10 do > SubList[i] = 0 > end for [snip] Try please: sequence SubList SubList = nested[9][3] for i = 1 to length(SubList) -- my be 10, if length(SubList)>=10 do SubList[i] = 0 end for nested[9][3] = SubList Regards, Igor Kachan kinz at peterlink.ru