From: Kedar Mhaswade Date: 2011-01-08T10:00:38+09:00 Subject: Re: Nooby question : multidimensional arrays. Thanks for the feedback! I simply thought it would be nice if you can address elements simply as: A[i, j, k ...] > uhm...i'm not sure what your trying to do with this, but what if i > wanted to > get the 5th element in the 4th dimension? Wouldn't that simply be dc[0,0,0,5]? > > i'd write the generator method something like this: > > while i < @n > j = 0 > while j < @m > @array[[i]] << 0 > j += 1 > end > i += 1 > end > > (i havnt tested it, so it may not work) > > then you'd need to define the other accessor methods & such... but > thats a > start > > hex -- Posted via http://www.ruby-forum.com/.