Re: Swap and pass-by-reference
- Posted by petelomax Jan 27, 2011
- 1670 views
DerekParnell said...
a <=> b
{a,b} = {b,a}
(or whatever syntax you lot settle on for multiple assignment) would be a more useful addition to the language.
I am surprised no-one has suggested swap(a,b) be implemented via a pre-processor.
Regards, Pete