Mercurial > hg > CbC > old > device
comparison test/macro.c @ 542:492f06738550
working... (struct init fix)
author | kono |
---|---|
date | Sun, 01 Jan 2006 18:49:07 +0900 |
parents | fe37f32b552b |
children | 0497fa2e2414 |
comparison
equal
deleted
inserted
replaced
541:4d853ee76ad6 | 542:492f06738550 |
---|---|
32 #define names(a,b) name_ ## b(a) | 32 #define names(a,b) name_ ## b(a) |
33 | 33 |
34 #define name_hoge(c) (c+a) | 34 #define name_hoge(c) (c+a) |
35 | 35 |
36 | 36 |
37 | 37 int |
38 main() { | 38 main() { |
39 int a,b,e; | 39 int a,b,e; |
40 | 40 |
41 b = heap[TEST111]; | 41 b = heap[TEST111]; |
42 d(a,b); | 42 d(a,b); |
50 /* 5,4 expected */ | 50 /* 5,4 expected */ |
51 #if 0 | 51 #if 0 |
52 g(car(cadr(e)),cadr(e)); | 52 g(car(cadr(e)),cadr(e)); |
53 #endif | 53 #endif |
54 #if 0 | 54 #if 0 |
55 printf("#0052:1\n"); | 55 printf("#0054:1\n"); |
56 #elif (1) | 56 #elif (1) |
57 printf("#0054:2\n"); | 57 printf("#0056:2\n"); |
58 #elif (2) | 58 #elif (2) |
59 printf("#0056:3\n"); | 59 printf("#0058:3\n"); |
60 #else | 60 #else |
61 printf("#0058:4\n"); | 61 printf("#0060:4\n"); |
62 #endif | 62 #endif |
63 #if 0 | 63 #if 0 |
64 printf("#0061:1\n"); | 64 printf("#0063:1\n"); |
65 #elif (0) | 65 #elif (0) |
66 printf("#0063:2\n"); | 66 printf("#0065:2\n"); |
67 #elif (0) | 67 #elif (0) |
68 printf("#0065:3\n"); | 68 printf("#0067:3\n"); |
69 #else | 69 #else |
70 printf("#0067:4\n"); | 70 printf("#0069:4\n"); |
71 #endif | 71 #endif |
72 printf("#0069:%d\n",name(3,hoge)); | 72 printf("#0071:%d\n",name(3,hoge)); |
73 printf("#0069:%d\n",names(3,hoge)); | 73 printf("#0072:%d\n",names(3,hoge)); |
74 return 0; | 74 return 0; |
75 } | 75 } |
76 | 76 |
77 #if 0 | 77 #if 0 |
78 #endif /* whoeh | 78 #endif /* whoeh |
79 wohefwiehfoi */ | 79 wohefwiehfoi */ |
80 longlong(int i,int j) | 80 void longlong(int i,int j) |
81 { | 81 { |
82 // long long i,j; | 82 // long long i,j; |
83 if (i>j) main(); | 83 if (i>j) main(); |
84 } | 84 } |