From: Michael Gorsuch Date: 2006-05-15T07:40:05+09:00 Subject: Re: begining programmer questions ------=_Part_28589_8537100.1147646402893 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Just to be clear, will you please send your current source. I'd be glad to look at it. On 5/14/06, corey konrad <0011@hush.com> wrote: > > oh ok i needed to remove the [] in the while loop to, ok. Now when i > type exit the while loop ends but then the entire program ends instead > of sorting the aray and printing it...? I dont understand that > > > corey konrad wrote: > > well i tried what you said but i still get an error now, it says that i > > have the wrong number of arguments. I know it isnt that important of > > program but i just dont understand the error messages. > > > > def input > > puts "Enter some info" > > info =3D [] > > info << gets.chomp > > while info[] !=3D "exit" > > info << gets.chomp > > end > > info.sort > > puts "#{info}" > > end > > > > > > > > corey konrad wrote: > >> ok thanks for the help > >> > >> > >> > >> Michael Gorsuch wrote: > >>> I suppose it could, but I think the easiest way to build an Array in > >>> ruby is > >>> as follows: > >>> > >>> info =3D [] > >>> > >>> You can build a Hash via: > >>> > >>> info =3D {} > > > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_28589_8537100.1147646402893--