lua-users home
lua-l archive

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


On Sun, Apr 21, 2013 at 9:26 PM, [ex] <exeqtor@gmail.com> wrote:
>
> the code in Lua:
>
>      print(bit32.bor(9.9, 0)) -- prints 10, not 9

Quoting http://www.lua.org/manual/5.2/manual.html#6.7:

"each argument is ... truncated to an integer (in some unspecified way)"

As such, while the code under MS_ASMTRICK gives different behaviour to
the other code, both behaviours are compatible with the Lua language
specification.