I've got a type that contains some byte arrays, with MAC addresses in them:
So ThisMAC is a 12 byte array containing a MAC address with :'s removed.
I know that the contents of UnitInfo.TABLETmac contains the same MAC address, although if I look at the one byte array in the watch window, the data is represented in a different way, I guess due to being within a type.
Problem is, when I do this:
the test always comes out true, indicating the array contents are different.
They are the same though - if I extract both array contents to strings, the strings are the same.
I could just compare the strings, but in the interest of keeping things simpler an understanding whats occurring, can anyone see why the test above is not working?
B4X:
Type UnitMACStruct(PCmac(12) As Byte, TABLETmac(12) As Byte)
Dim UnitInfo As UnitInfoStruct
Dim ThisMAC(12) As Byte
ThisMAC = bc.StringToBytes(serial1.Address.Replace(":",""),"UTF8")
So ThisMAC is a 12 byte array containing a MAC address with :'s removed.
I know that the contents of UnitInfo.TABLETmac contains the same MAC address, although if I look at the one byte array in the watch window, the data is represented in a different way, I guess due to being within a type.
Problem is, when I do this:
B4X:
If ThisMAC <> UnitMAC.TABLETmac Then
They are the same though - if I extract both array contents to strings, the strings are the same.
I could just compare the strings, but in the interest of keeping things simpler an understanding whats occurring, can anyone see why the test above is not working?