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;
The type is the array type
a-type of an object that
you declare to hold the context information stored by
setjmp and accessed by
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:
>=) with the other operand an integer constant expression
You can write such an expression only as the expression part of a do, expression, for, if, if-else, switch,, or while statement.
See also the Table of Contents and the Index.
Copyright © 1992-2013 by P.J. Plauger and Jim Brodie. All rights reserved.