lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Mon, Apr 27, 2009 at 3:32 PM, Mike Crowe <drmikecrowe@gmail.com> wrote:
Hi folks,

I was briefly caught by doing this test:

  if tonumber(something) > 0 then
     ...
  end

with something=nil.
I'm not advocating a change, but what's the thought-process behind this behavior?  Wouldn't you consider the numeric value of nil to be 0?

hmmmm

wasn't april 1st some 26 days ago?

:/