i want Xor result with asc(k) but when compile, i got error message: syntax error this is my code
what correct syntax for Xor? i confuse. thank you.
B4X:
Sub sendplc
Dim type_PLC As String
type_PLC= edtPLC.Text
Length=type_PLC.Length
'Length = Len(edtPLC.Text )
R = Asc( "@")
For I = 1 To Length
K = Asc(type_PLC.CharAt(I-1))
'Mid(edtPLC.Text , I , 1)
R = R Xor Asc(k) ' this error that i got?
Next
edtSendPLC.Text ="@" + type_PLC + R + "*" + CRLF
what correct syntax for Xor? i confuse. thank you.