From: Nathan Taylor-Hoover Date: 2007-06-28T01:23:59+09:00 Subject: Re: missing kEND for if statement, but not for a case statement? ------=_Part_41169_28012435.1182961440548 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline That is excellent. Thank you. I thought it was elseif but when I used that in my text editor that has support for ruby it did not colorize it as a keyword, however when I used else if it did so I was mislead into believing I had the correct syntax. On 6/27/07, Chris Carter wrote: > > On 6/27/07, Nathan Taylor-Hoover wrote: > > begin > > loopbreak = false > > while loopbreak != true > > str = gets > > if str =~ /help|HELP/ > > puts help > > else if str =~ /quit|QUIT/ > > loopbreak = true > > else if str =~ /options|OPTIONS/ > > puts options > > else > > puts "{#str} is not a valid command" > > end > > end > > > > ensure > > somehousecleaning() > > end > > > > The "else if" construct is elsif in ruby. doing else if will start an > actual new if statement that needs to be ended. > > -- > Chris Carter > concentrationstudios.com > brynmawrcs.com > > ------=_Part_41169_28012435.1182961440548--