H Herbert32 Active Member Licensed User Longtime User Jun 23, 2018 #1 Hi, since a few days i'm dispairing on working with datatype 'Byte'... All my research brings me to the ByteConverter-Library. But i have to say that i don't understand how to use it :-( Actually i try to write some bytes to a nfc-tag which works great by using some samples from this forum... but to come further, it seems that i have to understand the usage of the Byte-datatype... for example: Code: Copy TagTech.RunAsync("TT", "transceive", Array(Array As Byte(0xA2, 0xD3, 0x00, 0x00, 0x00, 0x00)), 0) It's not hard to understand that ' Array As Byte(0xA2, 0xD3, 0x00, 0x00, 0x00, 0x00) ' builds an Array which contains 6 Bytes - But how can i change the value of an array-item ??? What do i have to do to change the second Byte in this array from 0xD3 to 0xFF by code? hopefully someone can show me some links which will help me to understand working with Bytes :-/ thx in advance Herbert
Hi, since a few days i'm dispairing on working with datatype 'Byte'... All my research brings me to the ByteConverter-Library. But i have to say that i don't understand how to use it :-( Actually i try to write some bytes to a nfc-tag which works great by using some samples from this forum... but to come further, it seems that i have to understand the usage of the Byte-datatype... for example: Code: Copy TagTech.RunAsync("TT", "transceive", Array(Array As Byte(0xA2, 0xD3, 0x00, 0x00, 0x00, 0x00)), 0) It's not hard to understand that ' Array As Byte(0xA2, 0xD3, 0x00, 0x00, 0x00, 0x00) ' builds an Array which contains 6 Bytes - But how can i change the value of an array-item ??? What do i have to do to change the second Byte in this array from 0xD3 to 0xFF by code? hopefully someone can show me some links which will help me to understand working with Bytes :-/ thx in advance Herbert
KMatle Expert Licensed User Longtime User Jun 23, 2018 #2 Easy. An array is indexable. First entry is 0 the third is 2. So if your array is named "MyArray" then it would be Code: Copy MyArray(2) =0xFF Upvote 0
Easy. An array is indexable. First entry is 0 the third is 2. So if your array is named "MyArray" then it would be Code: Copy MyArray(2) =0xFF
H Herbert32 Active Member Licensed User Longtime User Jun 23, 2018 #3 Thank you for your reply. I understand so far. - My problem seems to be there where i have to generate the '0xFF' I can genereate a string which contains 'FF' or also a int with value 255 which should be '0xFF' but i don't understand how to generate the byte-variable which contains '0xFF' maybe by converting from a string or int :-( Upvote 0
Thank you for your reply. I understand so far. - My problem seems to be there where i have to generate the '0xFF' I can genereate a string which contains 'FF' or also a int with value 255 which should be '0xFF' but i don't understand how to generate the byte-variable which contains '0xFF' maybe by converting from a string or int :-(
H Herbert32 Active Member Licensed User Longtime User Jun 23, 2018 #4 KMatle said: Easy. An array is indexable. First entry is 0 the third is 2. So if your array is named "MyArray" then it would be Code: Copy MyArray(2) =0xFF Click to expand... in my case to change 0xD3 to 0xFF its Code: Copy MyArray(1) = 0xFF right? Upvote 0
KMatle said: Easy. An array is indexable. First entry is 0 the third is 2. So if your array is named "MyArray" then it would be Code: Copy MyArray(2) =0xFF Click to expand... in my case to change 0xD3 to 0xFF its Code: Copy MyArray(1) = 0xFF right?
H Herbert32 Active Member Licensed User Longtime User Jun 23, 2018 #5 finally i need a way to convert a string which contais the value "FF" to its Byte-equivalent - usually this should not be so complicated but i really can't find the tree by searching in this great forrest :-( Upvote 0
finally i need a way to convert a string which contais the value "FF" to its Byte-equivalent - usually this should not be so complicated but i really can't find the tree by searching in this great forrest :-(