BiteWise.ShiftRight

[quote=298807:@Jym Morton]@Robert Weaver I’ve put in about 100 positive numbers and they seem to be unaffected by the AND. Is this always true so I don’t have have to run an if statement to test the number being shifted?
if LValue > 0 then

(LValue, 8)
Else
(LValue, 8) AND 16777215
End If[/quote]
No. Positive values are unaffected, so you don’t need to test for sign, just AND everything.

Thanks Dave and Robert. I’m on RB2012 so it’s Integer 32-bit and it’s tough enough. I think I have to worry about the Neg and Pos but I’m not sure. I have it working with all the VB6 code, but I’m trying to change the VB6 to RB so it’s more affective and it’s really messy coding, so I’m cleaning it up too. Aaron B. has told me that the Neg/Pos shouldn’t matter because I’m doing bit work, so maybe I’ll try the UInt32 version next. I’m doing it as much to learn as anything else.