From: "David A. Black" Date: 2008-08-27T22:22:42+09:00 Subject: Re: syntax error, unexpected kELSE --1926193751-1706140974-1219843633=:29867 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-1706140974-1219843633=:29867" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-1706140974-1219843633=:29867 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi -- On Wed, 27 Aug 2008, Chris Bailey wrote: > Jes=C3=BAs Gabriel y Gal=C3=A1n wrote: >> On Wed, Aug 27, 2008 at 2:55 PM, Chris Bailey >> wrote: >>> puts "Exiting..." >>> $running =3D false >>> else >>> buf =3D "" >>> z =3D 0 >>> $map.each do |x| >>> x.each do |y| >>> if z < 5 >>> buf =3D buf + y.to_s >>> z++ >> >> Ruby doesn't support this syntax. Change it to z +=3D 1. >> >>> else >>> buf =3D buf + "\n" >>> z =3D 0 >>> end >>> end >>> end >>> puts buf >>> end >>> end >> >> Hope this helps, >> >> Jesus. > > > Thanks a million guys, I go back and forth with languages and didn't > even notice that. I wish the error had been "Syntax Error, You are an > idiot". I probably would have figured it out faster. Strictly speaking it's not a syntax error. You can do: a++ b and it's the same as a + +b. David --=20 Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL See http://www.rubypal.com for details and updates! --1926193751-1706140974-1219843633=:29867-- --1926193751-1706140974-1219843633=:29867--