Porting Java code to D that uses << and >>> operators

Era Scarecrow via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 1 19:07:11 PDT 2017


On Monday, 1 May 2017 at 21:04:15 UTC, bachmeier wrote:
> On Monday, 1 May 2017 at 18:16:48 UTC, Era Scarecrow wrote:
>>  Reminds me... was the unsigned shift >>> ever fixed?
>
> What was wrong with it?

Doing a broad test I'm seeing an issue with short & byte 
versions... Course that's probably due to the default upcasting 
to int rather than short/byte, while the >>>= works just fine. 
So...

byte f0 >> fffffff8
byte f0 >>> 7ffffff8
short f000 >> fffff800
short f000 >>> 7ffff800




More information about the Digitalmars-d-learn mailing list