Path: utzoo!utgpu!watmath!clyde!att!rutgers!mit-eddie!bu-cs!mirror!frog!john From: john@frog.UUCP (John Woods) Newsgroups: comp.lang.c Subject: Re: how widespread is this cpp bug? Keywords: cpp whitespace bug Message-ID: <1300@X.UUCP> Date: 6 Dec 88 02:44:00 GMT References: <49179@pyramid.pyramid.com> <12967@duke.cs.duke.edu> Organization: Servants of the Great White Frog Lines: 20 In article <12967@duke.cs.duke.edu>, khera@romeo.cs.duke.edu (Vick Khera) writes: > >#define VERSION 2 > >main() { > > proc/**/VERSION( a,b,c ); > >} > I have used this ``feature'' to simplify having to write a bunch of > duplicate code with a macro... how else would this macro be constructed? > In ANSI C, you use the ## operator. In some existing C's, you just simply can't construct such a macro, and if you ever want to use one of those C's, you're out of luck. The last time I wanted to do such a thing, I used M4 to generate the macros. It was much more flexible, anyway. -- John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101 ...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu Go be a `traves wasswort. - Doug Gwyn