lua-users home
lua-l archive

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



2013/7/10 Rena <hyperhacker@gmail.com>
T = (a << 24) | 0x10000000 | (((d & 0xF) >> 4) << 8) | ((d & 0xF0) >> 8) << 16) | (s + 0x100000)

what about using keyword operator just like 'and' / 'or'?

T = (a lshift 24)
    bor 0x10000000
    bor ((d band 0xF) rshift 4) lshift 8
    bor ((d band 0xF) rshift 8) lshift 16
    bor s + 0x100000




--
regards,
Xavier Wang.