From: Rob Biedenharn Date: 2009-05-01T05:22:56+09:00 Subject: Re: Strange two dimensional array behaviour On Apr 30, 2009, at 3:54 PM, Zsolnai Csaba wrote: > This code is supposed to read in a 9x9 table (sudoku table) from a > simple text file. It then needs to write it out on the screen. > > #Write out the 2 dimensional array > > for i in (1..9) > for j in (1..9) > print puzzle[i][j] > print " " > end > print "\n" > end > > end > > Any ideas, why ? > -- Arrays index from 0. A 9-element array has indexes from 0..8 -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com