<=> and obfuscation
Norman Diamond
ndiamond at watdaisy.UUCP
Fri Feb 8 13:14:27 AEST 1985
> To exchange two items without an intermediate variable, try:
>
> b ^= a ^= b ^= a
>
> Jon Shapiro
Try it enough, and you'll see that some compilers bind the value of the
first b before it is assigned at its second appearance, and other compilers
bind it afterwards. Correct results are obtained in the latter case.
Correct programming is obtained in neither case.
--
Norman Diamond
UUCP: {decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy at waterloo.csnet
ARPA: ndiamond%watdaisy%waterloo.csnet at csnet-relay.arpa
"Opinions are those of the keyboard, and do not reflect on me or higher-ups."
More information about the Comp.lang.c
mailing list