Commas in macro arguments

Karl Heuer karl at haddock.ima.isc.com
Thu Apr 12 02:46:22 AEST 1990


In article <MCDANIEL.90Apr10154614 at orenda.amara.uucp> mcdaniel at amara.uucp (Tim McDaniel) writes:
>
>   esp_003 at jhunix.UUCP (Stdnt003) writes:
>   >#define	call(a, b)	a ## b		/* (See K&R for details) */
>
>[This isn't legal, since `##' is expecting to produce a valid token.]

That is correct.  However, in this case there was no reason to use the paste
operator anyway.  The simpler construct
	#define	call(a, b) a b
does what Stdnt003 intended.

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list