From: Marnen Laibow-Koser Date: 2009-11-15T04:56:16+09:00 Subject: Re: Array within an array Mahadev Ittina wrote: > $array_floor = [] > for i in (0..7) > for n in (0..8) > $array_floor [n,i] = [i*var1,0.0,n*var2] > end > end Almost every line of this code is problematic. To fix: * Never use global variables. * Instead of your "for" constructs, use "times". * Use the proper syntax for multidimensional arrays (which is array[x][y], not array[x, y]). array[x, y] has a completely different meaning. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.