Bit object operates on Int

eparent

New Member
Licensed User
Longtime User
Is there a reason the Bit object was implemented to operate on Ints instead of Longs?

B4X:
Dim val As Long : val = 0x3082000000L
Dim mask As Long : mask = 0x10F000F000L
Dim result As Long : result = Bit.AND(val, mask)
' val = 208,339,468,288
' mask = 72,746,070,016
' result = -2,147,483,648

It seems if these operations have to be methods or functions instead of operators then they should accept the largest integer type.

Thank you.
 
Top