From: Mike Fletcher Date: 2006-10-11T03:35:22+09:00 Subject: Re: need help with $end vs kEND error Kd Kushelduv wrote: > if ( (num > $high) && (num != 0) ) then > $high = num > else if ( (num < $low) && (num != 0) ) then > $low = num > end This should be if ( (num > $high) && (num != 0) ) then $high = num elsif ( (num < $low) && (num != 0) ) then $low = num end Your else is starting a new block context (not the Ruby term I'm sure; that's kinda what I'd call it in Perl :) and Ruby thinks what you're doing is: if ... else if ... end end But you've only got a single end so it's confuzzled. -- Posted via http://www.ruby-forum.com/.