view test/macro.c @ 138:e6e77af048a1 float-double

float/dobule configuration
author kono
date Tue, 06 May 2003 02:31:46 +0900
parents ebac635814dc
children 096559f07a70
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 TEST0 33
#define TEST111 TEST0

#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;

   b = heap[TEST111];
   a =1; b = 3;
#ifndef a
   c(a,
      b);
   /* 3,5 expected */
#endif
   e=50; heap[51]=3; heap[3]=4;
   /* 5,4 expected */
#if 0
   g(car(cadr(e)),cadr(e));
#endif
}