Mercurial > hg > CbC > old > device
annotate test/tmp.c @ 449:c55363eff5e5
parallel assignment (modify not completed)
author | kono |
---|---|
date | Thu, 25 Nov 2004 16:56:26 +0900 |
parents | 0c256ea2a97e |
children | 32737bad7489 |
rev | line source |
---|---|
53 | 1 |
2 int | |
3 main1(int ac,char *av[],int (*f)(),int g()) | |
4 { | |
5 return (*f)(ac)+g(ac); | |
6 } | |
7 | |
8 int | |
9 g(int k) { | |
10 return k+1; | |
11 } | |
0 | 12 |
13 main0(ac,av) | |
14 { | |
15 return ac; | |
16 } | |
17 | |
18 main(ac,av) | |
19 int ac; | |
20 char *av[]; | |
21 { | |
22 register int i; | |
23 register char *p; | |
24 | |
25 p = av[1]; | |
26 if (!p) return; | |
27 i = p[1]; | |
28 p = p+i; | |
427 | 29 printf("#0028:%d %s\n",i,p-i); |
30 printf("#0029:%d\n",main1(ac,av,g,g)); | |
172 | 31 return 0; |
0 | 32 } |