#include // These are macro substitution so.. #define weeks(mins) (days(mins)/7) // How many weeks from so many days #define days(mins) (hours(mins)/24) // How many days from so many hours #define hours(mins) (mins/60) // How many hours from so many mins #define mins(secs) (secs/60) // How many mins from so many secs #define PRINT(a) printf(#a " = %d\n",(int)(a)) #define TRACE(x) if(traceon) printf("Trace: "), PRINT(x) // this is the call to 'g' "g(oo,dbye)" oo is defined as "th" // See "The C programming Language" by Kernighan, and Ritchie on the Preprocessor commands # and ## // #undef will undefine a MACRO ## concatenateactual arguments during MACRO expansion. #define g(a,b) a a ## b(nd) #define oo "th" #define oodbye(a) "e e" #a int traceon; main() { { // start nest PRINT( weeks(10080) ); // 10080 mins makes a week PRINT( days(mins(86400)) ) ; // 86400 secs make a day } // end nest /****** FEUER original code.... TRACE includes an open if statement. On expansion the if consumes the following else. Thus the puts is called only when i<10 and !traceon As traceon is set to 1 and not changed in the rest of the for execution the else puts("not yet"); is never seen. { // start nest int i; traceon = 1; for( i=20; i>0; i/=2 ) { if( i<10 ) TRACE(i); else puts("not yet"); } // end for } // end nest THIS ..... if( i<10 ) TRACE(i); else puts("not yet"); EXPANDS TO THIS.... if( i<10 ) if(traceon) printf("Trace: "), PRINT(x); else puts("not yet"); ******/ { // start nest int i; traceon = 1; for( i=20; i>0; i/=2 ) { if( i<10 ) { TRACE(i); } else { puts("not yet"); } } // end for } // end nest /******** The extra line between the 'if' and the 'else' trips this error "error C2181: illegal else without matching if" { int c = 1; if(c<0) puts("c<0"); put("this is between the 'if' and the 'else'"); else puts("c>0"); } ********/ { // start nest puts( g(oo,dbye) ); } // end nest }// end main