Sub And64Bits(a As Long, b As Long) As Long
Dim c As Long = Bit.And(Bit.And(a / Power(2, 48), 65535), Bit.And(b / Power(2, 48), 65535))
For j = 1 To 3
a = a * 65536
b = b * 65536
c = c * 65536 + Bit.And(Bit.And(a / Power(2, 48), 65535), Bit.And(b / Power(2, 48), 65535))
Next
Return c
End Sub
thank you for your help, but I get the same mistake. As below, I copy and paste the fault:
Dim Return As Long =And64Bits(0x1FFFC0000000,0x1FFFC0000000)
javac 1.6.0_24
shell\src\anywheresoftware\b4a\samples\bluetooth\main_subs_0.java:658: integer number too large: 1fffc0000000
_return = _and64bits(BA.numberCast(long.class, 0x1fffc0000000),BA.numberCast(long.class, 0x1fffc0000000));Debug.locals.put("Return", _return);Debug.locals.put("Return", _return);
I can't understand why the fault is talking about an integer number when I define only long datatype