int i = 0; /*control with coroutine*/ C: if (i > 0) { goto B; } if (1) { goto A; } /*create the codes with close spare*/ if(0){ A: while (i < 100) { i += 1; printf("%d\n", i); goto C; }
B: while (i != 0 && i > 0) { i -= 1; printf("%d\n", i); goto C; } // CONTROL(C); } return0; }
int i = 0; /*control with coroutine*/ CONTROL({ if (i > 0) { goto B; } if (1) { goto A; } }); /*create the codes with close spare*/ DEFCODE(A, 1, { while (i < 100) { i += 1; printf("%d\n", i); goto __CONTROL__; } }); DEFCODE(B, 1, { while (i != 0 && i > 0) { i -= 1; printf("%d\n",i); goto __CONTROL__; } }); /*a example with test code block*/ function(test,test_end, 1, { printf("test.\n"); }) used(test,test_end);