lua-users home
lua-l archive

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


Salve!

  I though that the following function:

function isItSane(n)
  return (tonumber(tostring(n)) == n);
end

will return _always_ and _everywhere_ return true. But it doesn't! Because tostring depends on current locale and tonumber doesn't! It is unstable, don't you think?

AMDG,
  Antero Vipunen.