Here's a reminder that we don't need an extra variable for swapping integer values:
It works for doubles and floats as well, but you might lose precision (12.2 becomes 12.1999998), so beware.
B4X:
Dim a = 120, b = 110 As Byte 'Short / Int / Long
Log(a & " | " & b) 'Output: 120 | 110
a = a + b
b = a - b
a = a - b
Log(a & " | " & b) 'Output: 110 | 120
It works for doubles and floats as well, but you might lose precision (12.2 becomes 12.1999998), so beware.