[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (work1) now available
- From: Philippe Lhoste <PhiLho@...>
- Date: Mon, 18 Jan 2010 19:08:16 +0100
On 18/01/2010 15:40, Roberto Ierusalimschy wrote:
I agree with you on this. Arithmetic right shift is a primitive
operation and I couldn't live without it.
Just a remind: at least we would be in good company, as ANSI C does not
offer this operation too :)
ISO/IEC 9899:1999 (E)
The result of E1>> E2 is E1 right-shifted E2 bit positions. If E1
has an unsigned type or if E1 has a signed type and a nonnegative
value, the value of the result is the integral part of the quotient of
E1 / 2E2. If E1 has a signed type and a negative value, the resulting
value is implementation-defined.
In the risk of shocking some people, C isn't the ultimate reference. Is it? :)
for unsigned right shift.
-- (near) Paris -- France
-- -- -- -- -- -- -- -- -- -- -- -- -- --