From: Hiato Xaero Date: 2007-10-31T04:47:00+09:00 Subject: Re: Array and ASCII Help needed... ------=_Part_4395_31850133.1193773619988 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > @n = @l[0] > > or even > > @n = @txt[k] > > > # if you know the dimensions already > @@da = Array.new(i) { Array.new(j) } > > # if you want to do it dynamically, e.g. insert a number at (3, 5) > > @@da = [] > @@da[3] ||= [] > @@da[3][5] = @n > > a ||= b is a common ruby idiom for "set a to b only if it isn't > already defined" - it expands to a = a || b. > > martin AHA! Thanks very very much! Works like a charm Hiato ------=_Part_4395_31850133.1193773619988--