[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (alpha-rc3) now available
- From: Nilson <nilson.brazil@...>
- Date: Tue, 23 Nov 2010 09:54:54 -0200
On Tue, Nov 23, 2010 at 7:14 AM, Patrick Rapin <toupie300@gmail.com> wrote:
> bit32.get(x, disp [, nbbits]) : returns the bit slice taken from
> number 'x', starting at bit # 'disp', and of size 'nbbits' bits (1 by
> default).
>
> bit32.set(val, x, disp [, nbbits]) : inserts the value 'val' as a bit
> slice into number 'x', starting at bit position 'disp', and of size
> 'nbbits' bits (1 by default). The number 'val' must be an integer
> between 0 and 2^nbbits-1.
>
> Sure, these functions can be written in terms of bit32.band,
> bit32.lshift, bit32.rshift and bit32.bor. But would they not be better
> implemented in C inside the library?
>
I like it.
+1
--
Nilson