Mercurial > hg > CbC > old > device
view test/call.c @ 177:352feeae4b0a
macro else/ccout
author | kono |
---|---|
date | Fri, 28 Nov 2003 15:16:43 +0900 |
parents | 096559f07a70 |
children | 0c256ea2a97e |
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("6 1 = %d %d\n",j,k); k = a3(4,a1); printf("6 1 = %d %d\n",j,k); k = a4(4,a1); printf("6 1 = %d %d\n",j,k); k = a5(4,a1); printf("6 1 = %d %d\n",j,k); return 0; }