Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

C++ Programming/Code/Standard C Library/Functions/longjmp

From Wikibooks, open books for an open world
<C++ Programming |Code/Standard C Library |Functions

longjmp

[edit |edit source]
Syntax
#include<csetjmp>voidlongjmp(jmp_bufenv,intval);

The function longjmp() behaves as a cross-functiongoto statement: it moves the point of execution to the record found in env, and causes setjmp() to returnval. Using longjmp() may have some side effects with variables in the setjmp() calling function that were modified after the initial return.

longjmp() does not call destructors of any created objects. As such, it has been superseded with the C++ exception system, which uses thethrow andcatch keywords.

Related topics
setjmp
Retrieved from "https://en.wikibooks.org/w/index.php?title=C%2B%2B_Programming/Code/Standard_C_Library/Functions/longjmp&oldid=3677271"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp