Mercurial > hg > CbC > CbC_examples
view rectypeTest/struct2.cbc @ 0:bacef8675607
init repository
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Oct 2014 17:34:59 +0900 |
parents | |
children |
line wrap: on
line source
struct interface { __code (*next)(); __rectype child; // __rectype *child; // struct interface *child; }; #include <stdio.h> __code csA() { printf("csA\n"); } __code csB() { printf("csB\n"); } int main() { struct interface p; p.next = csA; struct interface pp; pp.next = csB; p.child = &pp; // goto p.child->next(); goto p.child->next(); return 0; }