Swap and pass-by-reference
- Posted by bruce1961 Jan 26, 2011
- 1979 views
G'day
I just had a quick look into the past and saw a discussion in late 2009 about pass by reference. Has the situation changed at all? Reason I ask regards the RosettaCode question 'Generic Swap'; an Euphoria solution would seem to require pass by reference (or else something uniquely Euphorian that I'm ignorant of.)
The pass-by-value semantics means that that this
procedure swap( object a, object b ) object x x = a a = b b = x end procedure
doesn't work.
Kind regards, Bruce