B.8 Non-local Jumps: <setjmp.h>

The declarations in <setjmp.h> provide a way to avoid the normal function call and return sequence, typically to permit an immediate return from a deeply nested function call.

int setjmp(jmp_buf env)

      if (setjmp(env) == 0)
          /* get here on direct call */
      else
          /* get here by calling longjmp */

void longjmp(jmp_buf env, int val)

TCPL/B.08_Non-local_Jumps:_<setjmp.h> (last edited 2008-02-23 15:37:08 by localhost)

ch3n2k.com | Copyright (c) 2004-2022 czk.