Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!watmath!clyde!floyd!cmcl2!rna!dan
From: dan@rna.UUCP
Newsgroups: net.lang.c
Subject: String and Constant #defines ?
Message-ID: <217@rna.UUCP>
Date: Wed, 22-Feb-84 14:18:12 EST
Article-I.D.: rna.217
Posted: Wed Feb 22 14:18:12 1984
Date-Received: Thu, 23-Feb-84 05:24:06 EST
Lines: 23

Hi,
	Is there anyway of generating a string definition from a constant
definition in the C preprocessor ? I want to do something like:

#define	MSIZE	100

int msize = MSIZE;
char *csize = "MSIZE";

	This, of course doesn't work, csize gets "MSIZE", not "100". But
neither does:

#define	MSIZE	100
#define	string(x)	"x"

int msize = MSIZE;
char *csize = string(MSIZE);

	Haven't found a permutation that will work. Thanks.

					Cheers,
					Dan Ts'o
					...cmcl2!rna!dan