Macro names imbedded in pp-numbers [repost]

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Nov 18 09:57:44 AEST 1989


In article <1643 at crdos1.crd.ge.COM> davidsen at crdos1.UUCP (bill davidsen) writes:
>Example, for those not following this:
>	#define F_LIMIT	0x14e
>	/* and later in the program */
>	long error_count[F_LIMIT+5];	/* room for quadrant totals */
>	/* and also */
>	top3 = triad(bset, F_LIMIT+3);

There is no problem here, because the result of macro substitution is
not retokenized.

I don't feel like recounting the entire history of pp-numbers, even if
I could remember it all, but it was a reasonable solution to a very
difficult technical problem.  Earlier drafts tried to do it the way
you and Norman seem to think is "right", and it got more and more
snarled as we tried to get it untangled.  pp-numbers work well for the
intended purpose and cause problems only in very rare circumstances
and only for programmers with an obsessive aversion to white space.



More information about the Comp.std.c mailing list