swap(x,y)

H.L. Stahl hls at rwthbs.UUCP
Tue Sep 12 21:22:27 AEST 1989


In article <10897 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <1545 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
> ...
>
>>This is another example of keeping the tools from the programmer.
>
>No, this is another example of not knowing how to use the tools that are
>already provided.
^^^^^^^^^^^^^^^^^^^^^^^^^^^ VERY TRUE!

And by the way: why do you need an operator for swapping?

if it is for int, float, ..., it is quite simple; if it is for any structure,
you should better use pointers instead, which is faster.


Hans-Ludwig Stahl, Lehrstuhl fuer Betriebssysteme, RWTH Aachen
    |  _           Kopernikusstr. 16, D-5100 Aachen, ..49-(0)241- 80 76 34
    |_|_`__        > Domain:      hls at informatik.rwth-aachen.de
      | |__)       > uucp:        ...!{seismo,mcvax,uunet}!unido!rwthinf!hls
        |__)       > EARN/BITNET: HLS at DACTH01



More information about the Comp.lang.c mailing list