Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!crdgw1!crdos1!davidsen From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: swap(x,y) Message-ID: <433@crdos1.crd.ge.COM> Date: 21 Sep 89 12:54:59 GMT References: <8350@boring.cwi.nl> <14706@bfmny0.UU.NET> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: GE Corp R&D Center Lines: 19 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@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