From: Siep Korteling Date: 2008-07-21T05:35:34+09:00 Subject: Re: Simple program with a simple(?) error -- what's wrong? reuben doetsch wrote: > The scope of indx is wrong, when you call it outside the function, it is > only accesible witin that scope, the outer scope and so you have you do > this > > def foo > indx=0 > .... > end > (...) Or replace "indx" with "@indx". Regards, Siep -- Posted via http://www.ruby-forum.com/.