lua-users home
lua-l archive

Re: [ANN] Lua 5.2.0 (alpha-rc2) now available

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


On 19/11/2010, at 2:00 PM, David Manura wrote:
> The function does seem fairly trivial to include since bit32.TEST(...)
> == (bit32.AND(...) ~= 0).
> 
Trivial perhaps, but quite a few times I have fallen for this:
if bit.band (x, 0x10) then
 -- blah
end -- if
This 'if' always evaluates to true, which can catch people who are used to C.
For me, the "test" function is a welcome way of avoiding this (of course, you need to remember to use it).

AltStyle によって変換されたページ (->オリジナル) /