XOJO 2020r2.1 - Windows 10 Desktop
Following code exixts in my XOJO 2018r4 version and works fine:
s2 = efInputText.text
Var last As Integer = s2.CountFields(" “)
If s2.NthField(” “, 1) = “FF” And s2.NthField(” “, 4) = “43” Then
For i = 1 To last
X = X + ChrB(Val(”&H" + s2.NthField(" ", i).Trim))
Next
Else
MessageBox(“First byte needs to be FF and fourth byte 43”)
End If
S2 is a string “FF 22 04 43 01 02 03”
X is a CString
I am trying to change the ChrB to String.ChrByte but I can’t figure out how ?
Following code didn’t work :
X = X + Val("&H" + s2.NthField(" ", i).Trim).ChrByte
Thanks
Regards