Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!husc6!uwvax!astroatc!glen From: glen@astroatc.UUCP (Glen Ecklund) Newsgroups: comp.lang.c Subject: Re: swap macro Message-ID: <787@astroatc.UUCP> Date: 2 Feb 88 19:41:42 GMT References: <8801200422.AA19420@decwrl.dec.com> Reply-To: glen@astroatc.UUCP (Glen Ecklund) Organization: Astronautics Technology Cntr, Madison, WI Lines: 8 Summary: A new nit > #define swap(a,b) ((a) = ((b) = ((a) = (a) ^ (b)) ^ (b)) ^ (a)) <1> <2> I'm surprised that nobody has picked the nit that drew my attention. This macro requires the first assignment, at <1>, to be completed before the last (a), at <2>, is evaluated. My reading of K&R says this cannot be assured. Or did I miss something? Glen Ecklund