In a message dated 04-09-98, George White said to David Noon about Insertion
Or Bubble?
Hi George,
DN>#define SWAP(a,b) {a ^= b; b ^= a; a ^= b;}
DN>See that! I saved us a temporary storage location. ... :-)
GW>But my way will work on any integral data type (and on structs etc
GW>under C++), will yours?
Provided the arguments are both of the same integral data type all will be
copasetic. Besides, you were only using shorts.
Regards
Dave
___
* MR/2 2.25 #353 * 486SX: Why not just TELL them we left out the FPU?
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)
|