From: Christian Neukirchen Date: 2005-01-30T22:55:48+09:00 Subject: Re: nil question "William James" writes: > Sam Roberts wrote >> In ruby, zero and empty strings are true > > Since 0 is true, you should be able to do this in Ruby: > > puts "yes" if -5 < x < 9 > > The phrase '-5 < x' should yield the value of x instead of true. > That's the way it actually works in the Icon programming language. > But we have to use the klunky > > puts "yes" if -5 < x and x < 9 > Erm, say, x is -16: (-5 < x) < 9 (-5 < -16) < 9 -5 < 9 -5 -5 is true, probably not what you want. -- Christian Neukirchen http://chneukirchen.org