C Preprocessing With Tcl

By Jonathan S. Arney

Dr. Dobb's Journal August 1998

(a)
#$
set include_file "<stdio.h>"
puts stdout "#include $include_file"
#$
int main(int argc, char **argv)
{
	printf("Hello World");
}
(b)
#include <stdio.h>
int main(int argc, char **argv)
{
	printf("Hello World");
}

Example 2: (a) Sample CPDQ input file; (b) CPDQ output.

Back to Article


Copyright © 1998, Dr. Dobb's Journal