返回值
此函数不返回任何值。
示例
以下示例显示fmod函数的用法-
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
int main () {
int val;
jmp_buf env_buffer;
/* save calling environment for longjmp */
val = setjmp( env_buffer );
if( val != 0 ) {
printf("Returned from a longjmp() with value = %s\n", val);
exit(0);
}
printf("Jump function call\n");
jmpfunction( env_buffer );
return(0);
}
void jmpfunction(jmp_buf env_buf) {
longjmp(env_buf, "cainiaoya.com");
}
尝试一下
让我们编译并运行上面的程序,它将产生以下结果-
Jump function call
Returned from a longjmp() with value = cainiaoya.com