From: David Alan Black Date: 2001-03-24T00:58:05+09:00 Subject: [ruby-talk:13144] Re: How would Ruby say this? On Fri, 23 Mar 2001, Dave Thomas wrote: > "Lyle Johnson" writes: > > > The first obvious option for exposing this function in Ruby is to return > > both values as a two-element array, e.g. > ... > > But this is awkward. Another option I'm considering is to have the function > > raise an exception for the "false" return status: > > A third option would be to return 'nil' on no input (as presumably nil > can never be returned). Then you can write > > if res = getValue("What's the frequency..") > process ... > else > no input > end Although... 1.6.3 still gives the "found = in conditional, should be ==" warning (with -w). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav