lua-users home
lua-l archive

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


On 10/06/2009 19:47, Asko Kauppi wrote:
Personally, I am of the opinion that bitops are for enums and not for numbers.

Why?
Indeed, they are useful to combine flags (DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU) but also to get R, G, B, A components out of a RGBA number and to parse some binary file formats, for small bit maps, and so on.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --