comma operator
Peter da Silva
peter at sugar.UUCP
Fri Feb 5 03:26:37 AEST 1988
In article <3887 at sigi.Colorado.EDU>, swarbric at tramp.Colorado.EDU (SWARBRICK FRANCIS JOHN) writes:
> #define swap(a,b) ((a) = ((b) = ((a) = (a) ^ (b)) ^ (b)) ^ (a))
It is dependent on order of evaluation of assignments. It might work on your
compiler, but it's not guaranteed.
What does "inline" do if you get it to inline a swap routine?
--
-- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.
More information about the Comp.lang.c
mailing list