1 /* n_22.c: Tokenization of preprocessing number. */ 2 3 #include "defs.h" 4 5 #define str( a) # a 6 #define xstr( a) str( a) 7 #define EXP 1 8 main(void)9main( void) 10 { 11 fputs( "started\n", stderr); 12 13 /* 22.1: 12E+EXP is a preprocessing number, EXP is not expanded. */ 14 assert( strcmp( xstr( 12E+EXP), "12E+EXP") == 0); 15 16 /* 22.2: .2e-EXP is also a preprocessing number. */ 17 assert( strcmp( xstr( .2e-EXP), ".2e-EXP") == 0); 18 19 /* 22.3: + or - is allowed only following E or e, 12+EXP is not a 20 preprocessing number. */ 21 assert( strcmp( xstr( 12+EXP), "12+1") == 0); 22 23 fputs( "success\n", stderr); 24 return 0; 25 } 26 27