M Martin Beukes Member Licensed User Longtime User Sep 26, 2018 #1 Greetings, I am needing to convert an array of ints to an array of bytes and back again. I am not sure if I am missing something obvious here. Code: Copy Dim InvTable() As Int = Array As Int (0x09, 0x19, 0x29) Dim bs As ByteConverter Dim b() As Byte = bs.IntsToBytes(InvTable()) That is as far as I have managed to get, but you will see the last line raises an error and I am not sure what to do. Thanks, Martin
Greetings, I am needing to convert an array of ints to an array of bytes and back again. I am not sure if I am missing something obvious here. Code: Copy Dim InvTable() As Int = Array As Int (0x09, 0x19, 0x29) Dim bs As ByteConverter Dim b() As Byte = bs.IntsToBytes(InvTable()) That is as far as I have managed to get, but you will see the last line raises an error and I am not sure what to do. Thanks, Martin
Erel B4X founder Staff member Licensed User Longtime User Sep 26, 2018 #2 Will be easier for us if you post the error message. It should be: Code: Copy Dim b() As Byte = bs.IntsToBytes(InvTable) Upvote 0
Will be easier for us if you post the error message. It should be: Code: Copy Dim b() As Byte = bs.IntsToBytes(InvTable)
M Martin Beukes Member Licensed User Longtime User Sep 26, 2018 #3 hahahahahahahaha, time for more coffee. I found what is wrong. Sorry for wasting anyone's time. It was the brackets after the var name. Upvote 0
hahahahahahahaha, time for more coffee. I found what is wrong. Sorry for wasting anyone's time. It was the brackets after the var name.
npsonic Active Member Licensed User Sep 26, 2018 #4 Martin Beukes said: hahahahahahahaha, time for more coffee. I found what is wrong. Sorry for wasting anyone's time. It was the brackets after the var name. Click to expand... Maybe it should be less coffee. First sign of this is when your speaking is beginning to close speed of light and no one hasn't understand anything you said after your second cup of coffee. When you are jumping over obvious mistakes you should relax a little. Upvote 0
Martin Beukes said: hahahahahahahaha, time for more coffee. I found what is wrong. Sorry for wasting anyone's time. It was the brackets after the var name. Click to expand... Maybe it should be less coffee. First sign of this is when your speaking is beginning to close speed of light and no one hasn't understand anything you said after your second cup of coffee. When you are jumping over obvious mistakes you should relax a little.