◐ Shell
clean mode source ↗

set_jmp - cppreference.com

Da cppreference.com.

Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.

La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui.

Click here for the English version of this page

<metanoindex/>

<tbody> </tbody>

Elemento definito nell'header

<setjmp.h>

#define setjmp(env) /* implementation-defined */

Salva il contesto di esecuzione corrente in una variabile di env jmp_buf tipo. Questa variabile può essere utilizzata in seguito per ripristinare il contesto di esecuzione corrente per funzione longjmp. Cioè, quando una chiamata alla funzione longjmp è fatto, l'esecuzione continua al sito di chiamata particolare che la variabile costruito jmp_buf passata a longjmp. In questo caso restituisce setjmp valore tho passato a longjmp.

Original:

Saves the current execution context into a variable env of type jmp_buf. This variable can later be used to restore the current execution context by longjmp function. That is, when a call to longjmp function is made, the execution continues at the particular call site that constructed the jmp_buf variable passed to longjmp. In that case setjmp returns tho value passed to longjmp.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parametri

env -

variabile per salvare lo stato di esecuzione del programma di .

Original:

variable to save the execution state of the program to.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Valore di ritorno

0 se la macro è stato chiamato dal codice originale e il contesto di esecuzione è stato salvato env.

Original:

0 if the macro was called by the original code and the execution context was saved to env.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Valore diverso da zero se un salto non-locale è stata appena eseguita. Il valore di ritorno, lo stesso che passato a longjmp.

Original:

Non-zero value if a non-local jump was just performed. The return value in the same as passed to longjmp.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Esempio

Vedi anche