Mercurial > hg > CbC > old > device
comparison test/goto.c @ 80:83d901658ce9 indirect-call
*** empty log message ***
author | kono |
---|---|
date | Mon, 03 Mar 2003 05:41:10 +0900 |
parents | 82d0e30f61dd |
children | 096559f07a70 |
comparison
equal
deleted
inserted
replaced
79:82d0e30f61dd | 80:83d901658ce9 |
---|---|
10 void *env; | 10 void *env; |
11 | 11 |
12 code | 12 code |
13 a2(int i,code conv()) | 13 a2(int i,code conv()) |
14 { | 14 { |
15 printf("%d %x\n",i,conv); | 15 printf("a2 %d %x\n",i,conv); |
16 goto conv(i+1,a4); | 16 goto conv(i+1,a4); |
17 } | 17 } |
18 | 18 |
19 code | 19 code |
20 a3(int i,code (*conv)()) | 20 a3(int i,code (*conv)()) |
21 { | 21 { |
22 printf("%d %x\n",i,conv); | 22 printf("a3 %d %x\n",i,conv); |
23 goto conv(i+1,a5); | 23 goto conv(i+1,a5); |
24 } | 24 } |
25 | 25 |
26 code | 26 code |
27 a4(int i,code conv()) | 27 a4(int i,code conv()) |
28 { | 28 { |
29 printf("%d %x\n",i,conv); | 29 printf("a4 %d %x\n",i,conv); |
30 goto (*conv)(i+1,exit0); | 30 goto (*conv)(i+1,a6); |
31 } | 31 } |
32 | 32 |
33 code | 33 code |
34 a5(int i,code (*conv)()) | 34 a5(int i,code (*conv)()) |
35 { | 35 { |
36 printf("%d %x\n",i,conv); | 36 printf("a5 %d %x\n",i,conv); |
37 goto (*conv)(i+1,i+2,i+3,a7); | |
38 } | |
39 | |
40 code | |
41 a6(int i,int j,int k,code conv()) | |
42 { | |
43 printf("a6 %d %x\n",i,conv); | |
44 goto conv(i+1,j,k,a8); | |
45 } | |
46 | |
47 code | |
48 a7(int i,,int j,int k,code (*conv)()) | |
49 { | |
50 printf("a7 %d %x\n",i,conv); | |
51 goto conv(i+1,j,k,a9); | |
52 } | |
53 | |
54 code | |
55 a8(int i,int j,int k,code conv()) | |
56 { | |
57 printf("a8 %d %x\n",i,conv); | |
58 goto (*conv)(i+1,j,k,exit0); | |
59 } | |
60 | |
61 code | |
62 a9(int i,int j,int k,code (*conv)()) | |
63 { | |
64 printf("a9 %d %x\n",i,conv); | |
37 goto (*conv)(i+1),env; | 65 goto (*conv)(i+1),env; |
38 } | 66 } |
39 | 67 |
40 main(int ac,char *av[]) { | 68 main(int ac,char *av[]) { |
41 exit0 = return; | 69 exit0 = return; |