The following
Visual Basic subroutine swaps the values of its parameters using the xor operator.
Sub Swap (Var1, Var2)
Var1 = Var1 Xor Var2
Var2 = Var2 Xor Var1
Var1 = Var1 Xor Var2
End Sub
See: Xor swap algorithm
All Wikipedia text
is available under the
terms of the GNU Free Documentation License