Hi!
Is there a way I could exchange a and b (both a and b are integers) without using a temporary variable, so a = b and b = a? Some oneliner, or macro?
I think I saw once something with XOR, but I can't really remember what it was...
Thanks.
Exchanging two integers
Moderator: Board moderators
-
- New poster
- Posts: 44
- Joined: Fri Feb 20, 2004 5:52 pm
-
- Experienced poster
- Posts: 169
- Joined: Wed Oct 31, 2001 2:00 am
- Location: Singapore
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact: