BS> > a^=b^=a^=b;
BS> > but don't, it confuses people :^)
BS> Jasen...
BS> Since order of evaluation isn't guaranteed in C, this is bogus. You
ust
BS> instead use:
BS> a ^= b;
BS> b ^= a;
BS> a ^= b;
BS> The semicolons are the required sequence points missing from your
approach.
BS> IOW, it may or may not work, depending on your particular
BS> compiler.
Would it be OK to go: (((a ^= b)^= a) ^= b);
Doesn't a compler guarantee to perform the action of the inner-most
parens first?
* KWQ/2 1.2i *
--- FLAME v1.1
---------------
* Origin: Port Chicago's Loading Dock - 510-676-5359 (1:161/204)
|