/* * @(#) k4_11.c - Pre-processoring demo file. * (c) 1995 Ivan Maidanski http://ivmai.chat.ru * Freeware program source. All rights reserved. ** * Language: ANSI C * Tested with: BSD GNU CC * Last modified: 1995-10-30 09:15:00 GMT+03:00 */ /* Global Comment */ #ifndef INSERT #define INSERT #ifndef LIST #include #endif #include "k4_11.c" #define PRINT { printf("Line %d in File %s\n",__LINE__,__FILE__); } PRINT } #else /* Local Comment */ void main() { int a=5; #define MIN(a,b) ((a)<(b)) ? (a) : (b)) #define A "A defined" #define BD printf #define NAME(x,y) x##y ( #define DEBUG_INT(var) {printf("Debug info: " #var "= %d\n",var);} #if defined(A) NAME(print,f) "Result: " A); #endif DEBUG_INT(a) #define PRINT { printf("Date: %s\n",__DATE__); } PRINT #undef PRINT #endif