stefanoxjx Active Member Licensed User Longtime User Aug 3, 2020 #1 Hi, I know that probably this argument was discussed many times, but I tried to find a solution into the forum without satisfaction I need to print a byte in hex format. I tried ByteConverter lib, but it doesn't seem to do what I want. Can you help me? Thanks.
Hi, I know that probably this argument was discussed many times, but I tried to find a solution into the forum without satisfaction I need to print a byte in hex format. I tried ByteConverter lib, but it doesn't seem to do what I want. Can you help me? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2020 #2 stefanoxjx said: I tried ByteConverter lib, but it doesn't seem to do what I want. Can you help me? Click to expand... This is the correct solution. We can only help you if you tell us what you did and how didn't it work. Upvote 0
stefanoxjx said: I tried ByteConverter lib, but it doesn't seem to do what I want. Can you help me? Click to expand... This is the correct solution. We can only help you if you tell us what you did and how didn't it work.
stefanoxjx Active Member Licensed User Longtime User Aug 3, 2020 #3 Hi Erel, and thanks for your help. This is a part of code: B4X: Copy c = Bit.And(0xFF, Data(i)) edittext2.Text = edittext2.Text & BytesToString(c, 0, 1, "UTF-8") I need to convert a single byte, don't an array. The error is: Convert impossible {Type=Byte,Rank=0, RemoteObject=True} in: {Type=Byte,Rank=1, RemoteObject=True} Upvote 0
Hi Erel, and thanks for your help. This is a part of code: B4X: Copy c = Bit.And(0xFF, Data(i)) edittext2.Text = edittext2.Text & BytesToString(c, 0, 1, "UTF-8") I need to convert a single byte, don't an array. The error is: Convert impossible {Type=Byte,Rank=0, RemoteObject=True} in: {Type=Byte,Rank=1, RemoteObject=True}
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2020 #4 You should use ByteConverter.HexFromBytes. Upvote 0
stefanoxjx Active Member Licensed User Longtime User Aug 13, 2020 #5 Hi Erel, thanks for your help. I solved Upvote 0