I have a Case Study in making a shiftleft - shiftright a long variable, I use to perform the shift left or right the "bit.shiftleft function (int x1, int x2)", but it seems not work 'cause I always result in a negative value variaible of the results.
I supposed that it's 'cause int type is too many "short", i need to use an unsigned 4 byte number.
Does it exist a library for shiftleft/right on long type?
Sub Activity_Create(FirstTime As Boolean)
Dim jo As JavaObject
jo.InitializeContext
Log(jo.RunMethod("ShiftLeft", Array(DateTime.Now, 2)))
End Sub
#If JAVA
public long ShiftLeft(long N, Integer Shift) {
return N << Shift;
}
#End If