lua-users home
lua-l archive

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





On 5 June 2013 11:26, Dirk Laurie <dirk.laurie@gmail.com> wrote:
The Manual says, under lua_tointegerx:

   If the number is not an integer, it is truncated in some non-specified way.

A more accurate description of the present behaviour on at least one commonly
used system would be:

   If the number is not an integer, it is rounded in some non-specified way.

The code in llimits.h defining the process is heavy with #ifdef's and commented
with copious use of the word "trick". Suffice to say that it is strongly
implementation-dependent.

Maybe a neutral term would be more appropriate.

   If the number is not an integer, it is convered to an integer in
some non-specified way.



Sorry could you maybe explain what problem you have with the current wording, not forgetting to separate the language specification (manual) from one implementation of the specification (Rio Lua 5.2).

--Liam