Log In  


Cart #knutil_bunpack-2 | 2022-11-30 | Code ▽ | Embed ▽ | No License
1

Feature Overview

BUNPACK() slice the value with bit width.

  • By specifying the argument after [number w], a value of up to 32 bits can be sliced.
  • By setting [number s] to a negative value, bit slice can be started from the decimal point.
  • This function consumes 30 Token.
a,b=bunpack(0xf8,4,4,4) -- Value, First bit-shift, bit-width, ...[bit-width]
?a -- 15 (0xf)
?b -- 8 (0x8)

This function is included in the KNUTIL library.

release note


v0.1

  • first release
1



[Please log in to post a comment]