Why all this fuss about CTRL(X) ??
Michael Meissner
meissner at dg_rtp.UUCP
Wed Dec 31 23:08:42 AEST 1986
In article <1971 at emory.UUCP> arnold at emory.UUCP (Arnold D. Robbins {EUCC}) writes:
> I hope somebody hasn't beat me to this. The whole fuss about
>
> #define CTRL(X) ('X' & 037) /* ascii! */
>
> in the Reiser cpp not being doable in ANSI C can be answered this way:
>
> #define CTRL(X) (' ## X ## ' & 037) /* ascii only */
>
> which uses the token concatenation operator to produce the character
> constant. ....
This will not work with the ANSI preprocessor, because the ANSI preprocessor
only deals with tokens, not atoms (except for string-izing). The above
would try to create a character constant with 8 characters in it.
--
Michael Meissner, Data General
...mcnc!rti-sel!dg_rtp!meissner
More information about the Comp.lang.c
mailing list