Re: Need a hand with a small C conversion
- Posted by axtens Oct 19, 2008
- 976 views
Here's the completed routine, in case any one's interested:
function MergeSurrogates( atom hi, atom lo ) integer X integer W integer U X = or_bits( lshift( and_bits( hi, lshift(1,6) - 1), 10 ), and_bits( lo, lshift( 1, 10 ) - 1 ) ) W = and_bits( rshift( hi, 6 ), lshift( 1, 5 ) - 1) U = W + 1 return or_bits( lshift( U, 16 ), X ) end function
Thank to all contributors!
Bruce.