lua-users home
lua-l archive

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


On Aug 29, 2012, at 9:15 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

>> You have to realize that the result of string.format("%X",-1) is not
>> defined : is it 0xFF, 0xFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, ... ?
>> Lua 5.2 is more strict concerning range of accepted numerical values.
> 
> That is right.

Also, Lua 5.2 has bit32.band() [1] so an application-appropriate field may be selected.

e

[1] http://www.lua.org/manual/5.2/manual.html#pdf-bit32.band