[net.lang.c] String and constant #defines, Summation

dan@rna.UUCP (03/01/84)

Hi,
	Although among the number of responses I received, none were able to
suggest a way around the...

#define	MSIZE	100
int msize = MSIZE;
char *smsize = "MSIZE";

	where I would like smsize to contain "100".

	However rlgvax!jack made a suggestion that is probably satisfactory:

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

int msize = MSIZE(number);
char *smsize = MSIZE(string);

	Thanks.

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