From: Robert Klemme Date: 2009-04-08T00:59:11+09:00 Subject: Re: Array question - How dynamic is dynamic? On 07.04.2009 15:38, Mark Thomas wrote: > On Apr 7, 8:50 am, Ruby Student wrote: >> Main Array: >> >> mA = [ >> [A, B, C, D], >> [B, A, C, D], >> [D, C, B, A], >> [C, A, D, B] >> ] >> >> Sub Arrays: >> sAr0 (sub array row 0 to row n, where n is 3 for this case) >> sAr0 = [A, B, C, D] >> sAr1 = [B, A, C, D] >> sAr2 = [D, C, B, A] >> sAr3 = [C, A, D, B] > > I suggest you use the Matrix class (in the standard library). Are you sure this works? It seems, when I create a row Vector of the Matrix it is read only. At least []= is defined private. But I agree to the general advice to use a special class for this and not try to work with nested Arrays. That's what OO is for. Defining a two dimensional matrix with Vector proxies isn't too hard. Kind regards robert