Something new in C syntax
C. Allen Grabert
allen at bunker.UUCP
Sat Jan 28 02:30:49 AEST 1989
I encountered a block of code similar to the one below, with "jjj" NOT
defined to the preprocessor, and, essentially, could not figure out why
the first "printf" did not appear. I have since decided that the ifdef's
do NOT remove the action of the comment delimiters. I did not write the
code, but thought, like the author, that the first "printf" should not
have been commented out. Anyone like to comment on why it works the way
it does??
main()
{
#ifdef jjj
/*
#endif
printf("hello world\n");
#ifdef jjj
*/
#endif
printf("goodbye cruel world\n");
}
More information about the Comp.lang.c
mailing list