swap(x,y)

Wm E Davidsen Jr davidsen at crdos1.crd.ge.COM
Thu Sep 21 22:54:59 AEST 1989


  I don't agree that all of the features of the hardware should be in C
(or any other portable langauage), but swap is certainly a widely useful
operation in computer programs, and it could be represented by an
operator, thereby eliminating the need for all of the fancy, obscure,
and possibly non-portable things posted to the net in the last month or
so.

  I would be willing to bet that there are more uses of swap than shift
in applications programs, and yet we have shift. I don't believe that
the addition would make the language too large for any reasonable
computer (it adds about 100 bytes to a similar language which will run
in 64k on CP/M.

-- 
bill davidsen	(davidsen at crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon



More information about the Comp.lang.c mailing list