Include the standard header
to perform control transfers that bypass
the normal function call and return protocol.
#define setjmp(jmp_buf env) <int rvalue> typedef a-type jmp_buf; void longjmp(jmp_buf env, int val);
typedef a-type jmp_buf;
void longjmp(jmp_buf env, int val);
The function causes a second return from the execution of
that stored the current context value in
val is nonzero, the return value is
otherwise, it is 1.
The function that was active when
setjmp stored the current
context value must not have returned control to its caller. An object
with dynamic duration that does not have a volatile type and
whose stored value has changed since the current context value was stored
will have a stored value that is indeterminate.
#define setjmp(jmp_buf env) <int rvalue>
The macro stores the current context value in the array
env and returns zero. A later call to
that accesses the same context value causes
setjmp to again return, this time with a nonzero value.
You can use the macro
setjmp only in an expression that:
- has no operators
- has only the unary operator
- has one of the relational or equality operators (
>=) with the other operand an integer constant expression
Copyright © 1992-2006 by P.J. Plauger and Jim Brodie. All rights reserved.
Last modified: 2013-12-21