view test/macro.c @ 36:9f89cef85b41

*** empty log message ***
author kono
date Mon, 10 Feb 2003 10:07:00 +0900
parents
children 7aa449aff3e6
line wrap: on
line source


int heap[100];

#define car(e) (heap[(int)(e)])
#define cadr(e) (heap[((int)(e))+1])

#define TEST
int i;
TEST

#define c(a,b)  g(a+1,b+1)
#define g(a,b)  printf("%d %d\n",a+1,b+1);

main() {
   int a,b,e;

   a =1; b = 3;
#ifndef a
   c(a,
      b);
   /* 3,5 expected */
#endif
   car(cadr(e));
}