Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site allegra.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!jpl From: jpl@allegra.UUCP (John P. Linderman) Newsgroups: net.lang.c Subject: Re: Preprocessor Trickery Message-ID: <2557@allegra.UUCP> Date: Fri, 29-Jun-84 07:18:10 EDT Article-I.D.: allegra.2557 Posted: Fri Jun 29 07:18:10 1984 Date-Received: Sun, 1-Jul-84 03:39:00 EDT References: <12361@arizona.UUCP>, <141@pyuxt.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 17 I expected to see a hail of responses to this item, but since a few days have gone by, and the only response has been in support of X/**/y, the following ought to see the light of day: #define QUOTE(X) X #define MAKENAME(Y) QUOTE(X)Y #define CAT(X,Y) QUOTE(X)Y MAKENAME(lax) CAT(X,pertsystems) As long as macros are supported, this mechanism will work; no tricky stuff. To give credit where it is due, I think I first saw the QUOTE macro used by Mike Bianchi, for quite different reasons. It's a useful addition to one's bag of tricks. John P. Linderman Department of Macro Biology allegra!jpl