From: "David A. Black" Date: 2007-03-17T07:20:42+09:00 Subject: Re: Newbie: if / elseif Hi -- On 3/15/07, Chad Perrin wrote: > On Thu, Mar 15, 2007 at 02:41:53PM +0900, John Joyce wrote: > > So it doesn't work like the C variety? > > > > if ( condition ) > > statement // maybe done > > else if ( condition ) > > statement // or maybe done > > else > > statement // done if the 1st and 2nd are not done > > Err . . . I'm pretty sure if, elsif, else works exactly like the C if, > else if, else. Pretty much, except in Ruby there's no need for a rule to resolve if/else ambiguity, because 'end' always makes it clear. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)