The triple XOR method will only work with integers in VFP. Don't know about other languages.
Laurie On 22 April 2016 at 22:21, AndyHC <[email protected]> wrote: > > ditto - but nearly 50 years ago - and back then I used the triple XOR > method (IBM 360 macro-assember) <s> > > > On 21/04/2016 20:24, Michael Glassman wrote: > >> I don't think I've swapped variables since writing bubble sorts 40 years >> ago. >> >> Mike >> >> >> >> -----Original Message----- >> From: ProfoxTech [mailto:[email protected]] On Behalf Of Peter >> Cushing >> Sent: Thursday, April 21, 2016 7:47 AM >> To: [email protected] >> Subject: Re: Swap two variables >> >> On 21/04/2016 11:43, Laurie Alvey wrote: >> >>> I'm sure we're all familiar with the standard way to swap two variables: >>> >>> LOCAL p, q >>> p = 1 >>> q = 2 >>> Swap(@p, @q) && pass by reference >>> >>> PROCEDURE Swap(v1, v2) >>> LOCAL dum >>> dum = v1 >>> v1 = v2 >>> v2 = dum >>> ENDPROC >>> >>> Never had an occasion to swap variables. Under what sort of situation is >> this useful? >> >> Thanks, >> >> Peter >> >> >> This communication is intended for the person or organisation to whom it >> is >> addressed. The contents are confidential and may be protected in law. >> Unauthorised use, copying or disclosure of any of it may be unlawful. If >> you >> have received this message in error, please notify us immediately by >> telephone or email. >> >> www.whisperingsmith.com >> >> Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. >> Tel:0161 831 3700 >> Fax:0161 831 3715 >> >> London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960 >> >> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAMvTR9fnj6=sp9tksf3vyvsjqnosrjy6awhcl1bxjzgnr1z...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

