comparison CbC-examples/rectypeTest/typedef3.cbc @ 108:7ad14f446135

add CbC-example/rectypeTest/
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Thu, 14 Jun 2012 20:30:24 +0900
parents
children
comparison
equal deleted inserted replaced
107:a3a2f64cf8f4 108:7ad14f446135
1 typedef __code (*csPtr)(__rectype*);
2
3 #include <stdio.h>
4 __code cs_end(csPtr *p)
5 {
6 printf("end\n");
7 }
8
9 __code cs(csPtr p)
10 {
11 csPtr *b; // <- This declaration please care.
12 goto p(b);
13 // goto p(3); // note: expected ‘void (**’ but argument is of type ‘int’
14 }
15
16 int main() {
17 csPtr p;
18 p = cs_end;
19 goto cs(p);
20 return 0;
21 }