SWAP macro

Pete Zakel pete at valid.UUCP
Fri Jul 4 06:55:53 AEST 1986


> Unless one is willing to do a
> different version of the macro for each type, you need a way to generate
> a new variable of the same type as one of the macro args.  The language
> provides no way to do this.

What's wrong with the "swap(type, a, b)" invocation? You only need one
macro declaration.  Of course, you must declare the type each time you use
it.
-- 
-Pete Zakel (..!{hplabs,amd,pyramid,ihnp4}!pesnta!valid!pete)



More information about the Comp.lang.c mailing list