Mercurial > hg > CbC > CbC_examples
view rectype/struct.cbc @ 2:35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 22 Oct 2014 02:06:29 +0900 (2014-10-21) |
parents | bacef8675607 |
children |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> struct interface { __code (*next)(struct interface); }; __code print(struct interface p) { printf("print\n"); exit(0); } __code csA(struct interface p) { struct interface ds; ds.next = csA; goto p.next(ds); } void main1() { struct interface ds; ds.next = print; goto csA(ds); } int main() { main1(); return 0; }