[net.lang.c] Forming composite tokens using /

jim@ism780.UUCP (05/11/84)

#R:randvax:-178200:ism780:12500005:000:597
ism780!jim    May 10 10:32:00 1984

> Another alternative (which is probably equally offensive):
>    |
>    |#define cat(a,b) a\
>    |b
>    |
> At least this doesn't rely on the preprocessor stripping comments.
> But it is still likely to be non-portable.

Due to typical AT&T brain damage, this does not work in System V, where
the backslash-newline is turned into a space (idiots!).

A method guaranteed to work anywhere is

#define IDENT(x)x
#define CAT(a,b)IDENT(a)b

Be sure that you use CAT(x,y) instead of, e.g., CAT(x, y), since the white
space is part of the macro argument.

-- Jim Balter, Interactive Systems (ima!jim)