You _CAN_ "stringize" tokens in (some) K&R pre-processors

Christopher R Volpe volpe at camelback.crd.ge.com
Wed Apr 3 01:05:22 AEST 1991


I thought just about all K&R1 based compilers expanded formal arguments
within quotes, so the following would work:

#define STRINGIZE(x) "x"

STRINGIZE(foo) ==> "foo"

At least it works on SunOS cc.

==================
Chris Volpe
G.E. Corporate R&D
volpecr at crd.ge.com



More information about the Comp.lang.c mailing list