lua-users home
lua-l archive

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

> > Do we really want "tostring(0.1)" to return "0.10000000000000001"?
> Yes, I think we do. If you wanted something to LOOK pretty, instead of
> having it be CORRECT, you wouldn't use tostring() -- you'd be using
> print.format().

Well, we do not. We could debate whether tostring{} -> 0x83ffda8 or even
tostring("123") is CORRECT. Anyway, the manual is very clear about it:

  "Receives an argument of any type and converts it to a string in a
  reasonable format."

The key word there is *reasonable*.

-- Roberto