in reply to interchanging variables the tough way
This swaps 2 variables without using a temporary, simply do it twice to swap three, e.g:$a = $a ^ $b; $b = $a ^ $b; $a = $a ^ $b;
Hope this helps ;-)$a = $a ^ $b; $b = $a ^ $b; $a = $a ^ $b; $b = $b ^ $c; $c = $b ^ $c; $b = $b ^ $c;
|
---|