lua-users home
lua-l archive

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

On 07/08/15 07:21 PM, Sean Conner wrote:
It was thus said that the Great Soni L. once stated:
Any reason why string.(un)pack can't do bitfields?
   Performance reasons?

   But that aside, what would the spefication string look like to pull bits

   -spc (Also, maybe it didn't cross Roberto's mind to do so?)

Fn? Dn? e.g. D3D3D2 (or replace D with F) would be 8 bits composed of 3, 3, 2 bits, DX[n] would be a padding modifier?

I guess I'll just have to wait for Roberto...

(We also can't do booleans either - would make things easier when you have a long format string as you wouldn't have to add a bunch of "var = var != 0" everywhere slowing your code down)

Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.