Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: Re: ANSI C and the C Pre-Processor Message-ID: <4387@utzoo.UUCP> Date: Sat, 29-Sep-84 19:25:38 EDT Article-I.D.: utzoo.4387 Posted: Sat Sep 29 19:25:38 1984 Date-Received: Sat, 29-Sep-84 19:25:38 EDT References: <4335@utzoo.UUCP>, <4082@tekecs.UUCP> Organization: U of Toronto Zoology Lines: 18 > ............................ One proposal is to do the substitution > if the argument name is the only thing within the quotes. i.e. > #define foo(bar) printf("bar") > will expand bar within the quotes where > #define foo(bar) printf("the argument was bar") > will not expand bar. Some folks may not understand why the approach Joe describes is a full solution to "stringizing". Remember that the draft standard specifies that consecutive string constants are concatenated at compile time, so you could say something like #define foo(bar) printf("the argument was " "bar") to get the effect of substitution within a string. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry