Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!lll-lcc!ames!ucbcad!ucbvax!decvax!decwrl!sun!terra!brent From: brent@terra.UUCP Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: need cpp macros to concatenate names Message-ID: <18056@sun.uucp> Date: Tue, 5-May-87 12:11:50 EDT Article-I.D.: sun.18056 Posted: Tue May 5 12:11:50 1987 Date-Received: Thu, 7-May-87 02:47:07 EDT References: <634@calma.UUCP> Sender: news@sun.uucp Distribution: na Lines: 24 Xref: utgpu comp.unix.wizards:2005 comp.unix.questions:1930 Summary: use a comment ? In article <634@calma.UUCP>, clark@calma.UUCP (Al Clark) writes: > > Has anyone had any success using a macro to concatenate two words; eg: > concat(one, word) to generate the the single word 'oneword', as in the > following code segment. > > #define prefix my > > #define concat(x,y) x\ > y > > main() > { > long *concat(prefix,file); > } Have you tried using a null comment ? It works OK on the Sun compiler e.g. #define concat(x,y) x/**/y Made in New Zealand --> Brent Callaghan @ Sun Microsystems uucp: sun!bcallaghan phone: (415) 691 6188