From: Roy Patrick Tan Date: 2001-02-25T03:10:03+09:00 Subject: [ruby-talk:11468] multidimenstional arrays? Hi, I'm a bit new to Ruby, and I have a couple of questions: 1. How do you instantiate multidimensional arrays? For single dimensions, I can do: a = Array.new a[100] = "foo" But if I wanted to do 2 dimensions, I currently create a one dimensional array, and if I wanted to enter a new value, I have to check if the row is empty: a = Array.new if a[200] = nil then a[200] = Array.new end a[200][200] = "foo" Is there a simpler way? something like a = [][] a[300][300] = "goo" (which doesn't work...) 2. Multiline comments? Is there a mechanism for it in ruby? ie /* ... */ Thanks for any help