#include
#include
#include
jmp_buf jumper;
void subroutine()
{
longjmp(jumper,1);
printf("never to be execute \n");
}
int main(int argc ,char ** argv)
{
int value;
value =setjmp(jumper);
if(value!=0)
{
printf("Longjmp with value=%d\n",value);
exit(value);
}
printf("About to call subroutine...\n");
subroutine();
return 0;
}
阅读(471) | 评论(0) | 转发(0) |