Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site wjvax.wjvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!sun!saber!qubix!wjvax!brett From: brett@wjvax.UUCP (Brett Galloway) Newsgroups: net.unix-wizards Subject: 4.2 BSD C preprocessor query (macros in quotes) Message-ID: <676@wjvax.wjvax.UUCP> Date: Mon, 14-Apr-86 12:08:04 EST Article-I.D.: wjvax.676 Posted: Mon Apr 14 12:08:04 1986 Date-Received: Thu, 17-Apr-86 05:03:38 EST Reply-To: brett@wjvax.UUCP (Brett Galloway) Organization: Watkins-Johnson Co., San Jose, Calif. Lines: 18 Keywords: 4.2, BSD, C, preprocessor I have a program in which I have a macro defining a number. I want the C compiler/preprocessor to generate a string containing that number. For example ... #define NUM 2 #define NUMSTR "NUM" The problem is that the C preprocessor will not substitute NUM when it is in quotes. My question (for this example) is whether there is any way to generate a macro with value "2" frm the macro NUM. Please respond by mail. I will summarize. Thank you (in advance) ------------- Brett Galloway {pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett