Mercurial > hg > CbC > CbC_gcc
comparison CbC-examples/rectypeTest/rectypeTest1.cbc @ 106:85047c4f1ca4
add CbC-examples/rectypeTest
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 13 Jun 2012 17:18:58 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
105:b3cfc7733d3f | 106:85047c4f1ca4 |
---|---|
1 #include <stdio.h> | |
2 #include <stdlib.h> | |
3 | |
4 __code print(__rectype *p, int num) { | |
5 printf("num = %d\n",num); | |
6 exit(0); | |
7 } | |
8 | |
9 //__code csA(__rectype *p, int num) { | |
10 __code csA(__code (*p)(void*,int), int num) {// goto p(csA,3,4); // error: too many arguments | |
11 goto p(2,3); // error : internal compiler error | |
12 // goto p(csA,3); | |
13 return; | |
14 } | |
15 | |
16 void funcA(__code (*p)()){ | |
17 goto p(print, 3); | |
18 return; | |
19 } | |
20 | |
21 int main() { | |
22 funcA(csA); | |
23 return 0; | |
24 } |