Mercurial > hg > CbC > old > examples
view code-ptr-array.c @ 8:ae12f717a62e draft default tip
fix first example
author | one |
---|---|
date | Wed, 07 Jun 2017 14:57:55 +0900 |
parents | e59ebf6fe2b0 |
children |
line wrap: on
line source
extern int printf(char*,...); code aho0(int *i, code(*ret)(), void *env) { printf("aho%d\n", *i); (*i)++; goto ret(),env; } void aho() { static int i=0; goto aho0(&i,return,environment); } code(*lis[5])()={ aho0, aho0, aho0, aho0, (void*)0, }; int main() { int i; for(i=0;i<5;i++){ aho(); } return(0); }