Re: Referencing Nested Sequences

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sat, 07 Jun 2003 18:55:21 +1000, pblonner at optushome.com.au wrote:

>e.g   for i =3D 1 to 10 do
>            nested[9][3][i] =3D 0
>        end for
>
>if it done as
>      SubList =3D nested[9][3]
>    for i =3D 1 to 10 do
>            SubList[i] =3D 0
>     end for
>
>The latter causes a new list to be made - which is not what I want
You are missing the last line:
	nested[9][3] =3D SubList

Processing inner elements via temporary variables (and remembering to
put them back) is actually the fastest way to do this (excepting of
course nested[9][3][1..10]=3Drepeat(0,10);), as well as being quite
readable.

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu