Porting Java code to D that uses << and >>> operators
bachmeier via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon May 1 08:45:00 PDT 2017
I'm porting a small piece of Java code into D, but I've run into
this:
int y1 = ((x12 & MASK12) << 22) + (x12 >>> 9) + ((x13 & MASK13)
<< 7) + (x13 >>> 24);
I have a basic understanding of those operators in both
languages, but I can't find a sufficiently detailed explanation
to tell me how to translate the Java into D and know that it's
guaranteed to give the same result. Can someone tell me the
correct D code to use?
More information about the Digitalmars-d-learn
mailing list