From: "ara.t.howard" Date: 2008-05-20T13:32:06+09:00 Subject: Re: Why doesn't Float() work the same as Integer()? On May 19, 2008, at 9:45 PM, Michael W. Ryder wrote: > temp = nil > temp = Float(x) if (Float(x) rescue false) > if temp == nil > temp = Integer(x) if (Integer(x) rescue false) > end > if temp == nil > x = 0 > else > x = temp > end > > As you can see this is much more code, and that is before I add in > more code for error handling. sort of, you can write this x = Float(x) rescue Integer(x) rescue 0 but be aware, Float and Integer will handle a nil argument differently. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama