J
JJK
I'd tried to port an application from vb6 to vb.net 2003. While testing is
I'd got a error in the XOR operator. This is an example:
dim c as Byte
....
mask = 190
Fileget(1,c)
c = c XOR mask
Fileput(2,c)
Run 1:
FileGet (1,c)
c = 77
c = c xor mask
c = 137
FilePut(2,c)
Run 2:
mask = 190
FileGet(1,c)
c = 137 ' That is OK
c = c XOR mask
c = 143 ' That is NOT my intention. I would it be 77 again
FilePut(1,c)
In vb6 I'd got in the second run as result of c = c Xor mask, c = 77 again
What is the matter?
I'd got a error in the XOR operator. This is an example:
dim c as Byte
....
mask = 190
Fileget(1,c)
c = c XOR mask
Fileput(2,c)
Run 1:
FileGet (1,c)
c = 77
c = c xor mask
c = 137
FilePut(2,c)
Run 2:
mask = 190
FileGet(1,c)
c = 137 ' That is OK
c = c XOR mask
c = 143 ' That is NOT my intention. I would it be 77 again
FilePut(1,c)
In vb6 I'd got in the second run as result of c = c Xor mask, c = 77 again
What is the matter?