请输入您要查询的百科知识:

 

词条 longjump
释义

函数名: longjump

功 能: 执行非局部转移

用 法: void longjump(jmp_buf env, int val);

程序例:

#include

#include

#include

void subroutine(jmp_buf);

int main(void)

{

int value;

jmp_buf jumper;

value = setjmp(jumper);

if (value != 0)

{

printf("Longjmp with value %d\", value);

exit(value);

}

printf("About to call subroutine ... \");

subroutine(jumper);

return 0;

}

void subroutine(jmp_buf jumper)

{

longjmp(jumper,1);

}

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/27 4:47:19