C examples for setjmp.h:jmp_buf
data type
Type to hold information to restore calling environment
<setjmp.h> <csetjmp>
This is an array type storing the information of a calling environment to be restored later.
#include <stdio.h> #include <setjmp.h> int main()//from w w w.j a v a 2 s. c o m { jmp_buf env; int val; val=setjmp(env); printf ("val is %d\n",val); if (!val) longjmp(env, 1); return 0; }