Mercurial > hg > CbC > old > device
view test/call.c @ 449:c55363eff5e5
parallel assignment (modify not completed)
author | kono |
---|---|
date | Thu, 25 Nov 2004 16:56:26 +0900 |
parents | 0c256ea2a97e |
children | 32737bad7489 |
line wrap: on
line source
int a0(int i); int (*conv)(int); a0(int i) { return i+3; } a1(int i) { return i-3; } a2(int i,int conv(int)) { return conv(i); } a3(int i,int (*conv)(int)) { return conv(i); } a4(int i,int conv(int)) { return (*conv)(i); } a5(int i,int (*conv)(int)) { return (*conv)(i); } main(int ac,char *av[]) { int j,k; conv = a0; j = conv(3); k = a2(4,a1); printf("#0042:6 1 = %d %d\n",j,k); k = a3(4,a1); printf("#0044:6 1 = %d %d\n",j,k); k = a4(4,a1); printf("#0046:6 1 = %d %d\n",j,k); k = a5(4,a1); printf("#0048:6 1 = %d %d\n",j,k); return 0; }