Preprocessor Usage Question

Jim Balter jim at segue.segue.com
Tue Apr 30 09:32:03 AEST 1991


In article <1991Apr25.234340.22311 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>  I guess the summary of all this is that something like this
>
>	#ifdef __STDC__
>	#define RADIO(x) a_##x
>	#else
>	#define RADIO(x) a_/**/x
>	#endif
>
>is the best you can do.

Actually

#ifdef __STDC__
#define RADIO(x) a_##x
#else
#define IDENT(x)x
#define RADIO(x) IDENT(a_)x
#endif

is better, because it works for more cpp's.  It could fail
for a non-ANSI cpp that has ANSI-style tokenization.
The IDRIS (the what?) cpp might fit that bill.



More information about the Comp.unix.questions mailing list