My app needs to invert the value of a given integer (8 bit).
I looked for NOT, but the signature expects an Integer: NOT(Value As Boolean) As Boolean
I also looked for INV() or Inverse(), but no joy.
I want to do the following:
Dim Command as Integer
Dim ExpectedResponse as Integer
Command = 20 ' Arbitary number assigned
ExpectedResponse = INV(Command) ' Should be 235
Any suggestions?
Maybe just:
I looked for NOT, but the signature expects an Integer: NOT(Value As Boolean) As Boolean
I also looked for INV() or Inverse(), but no joy.
I want to do the following:
Dim Command as Integer
Dim ExpectedResponse as Integer
Command = 20 ' Arbitary number assigned
ExpectedResponse = INV(Command) ' Should be 235
Any suggestions?
Maybe just:
B4X:
ExpectedResponse = 255 - Command