trouble with macro`s

Mark W. Schumann catfood at NCoast.ORG
Sun Mar 17 07:34:46 AEST 1991


In article <27489 at netcom.COM> aed at netcom.COM (Andrew Davidson) writes:
>I belive that ansi preprocessors are supposed to support this as
>follows
>
>#define name2(a,b) a##b
>
>unfortuanly I am using a k&r compiler (I am working on a sun work
>station and can not change compilers)

You could try

  #dfine name2(a,b) a/**/b

This might work, but I am not sure whether K&R compilers strip
comments before or after evaluating macros.  Try it.

-- 
============================================================
Mark W. Schumann  3111 Mapledale Avenue, Cleveland 44109 USA
Domain: catfood at ncoast.org
UUCP:   ...!mailrus!usenet.ins.cwru.edu!ncoast!catfood



More information about the Comp.lang.c mailing list