#include <stdio.h>

int function(void) {
static int i, state = ;
switch (state) {
case : goto LABEL0;
case : goto LABEL1;
}
LABEL0: /* start of function */
for (i = ; i < ; i++) {
state = ; /* so we will come back to LABEL1 */
return i;
LABEL1:; /* resume control straight after the return */
}
} int main(){
printf(":%d\n" , function());
printf(":%d\n" , function());
printf(":%d\n" , function());
printf(":%d\n" , function());
printf(":%d\n" , function());
return ;
}

想过,但是没想到,还真有啊!

04-28 09:15