lua-users home
lua-l archive

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


> I suppose such data manipulation often requires treating ints as
> unsigned quantities, therefore a bit64 library would be necessary
> (in a previous post Roberto said its realization is probable).

We are considering adding bitwise operations to Lua. After all, the main
reason Lua did not have them was that they were awkward as primitive
operations over floating-point numbers. With integer numbers, this
problem is gone.


> If one would ensure portability of Lua code a
> mechanism should be provided for a Lua script to query the
> interpreter about the current int width, [...]

try this:

> print(debug.numbits'i', debug.numbits'f')

-- Roberto