Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 148 -
4. Non-local jumps
( setjmp.h )
------------------------------------------------------------------------------
4.1 Save current environment for non-local jump
. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
setjmp
[Syntax]
#include <setjmp.h>
int setjmp( jmp_buf env ) ;
[Arguments]
env Buffer in which contents of stack is saved.
[Return]
Returns zero. When "setjmp" is called again by "longjmp", it returns
"value", one of arguments of "longjmp". If "value" is zero, it
returns 1.
[Description]
"setjmp" saves contents of stack in "env" for restoring by the later
"longjmp". This enables jumping between functions.
See also "longjmp" for more information.