DICE
4 messages in this thread
?
I'm using DICE and having problems getting the PreProcessor to echo
arguments, like from _The_C _Puzzle_Book_:
#define PRINT(int) printf("int = %d\n",int)
produces 00000000 = 3 rather than x | y & z = 3
when given PRINT( x | y & z ); in the main program.
I was wondering if I was doing something wrong or if this a problem with
the DICE preprocessor. Any help or suggestions would be appreciated.
<Rick?
[A\exit
It's a problem in your understanding of the preprocessor. 🙂 Your macro
expands to 'printf("int = %d\n", x | y & z )', which turns into what you
saw when you ran the program. The 'int' in the "int = " string doesn't get
substituted because it's in a string. It turns out C isn't very good at
this kind of macro, one that wants to turn tokens into strings.
Rick,
I don't think Matt Dillon is ever on CIS. I hope some of our other C
programmers will help with your problems, but if you want to locate Matt
himself, you will probably need to write to him. His address is in the
docs.
.Betty
Thanks, maybe I can reach him on UseNet.
<Rick?