SW500011 Microchip Technology, SW500011 Datasheet - Page 222

HI-TECH X PRO FOR PIC32

SW500011

Manufacturer Part Number
SW500011
Description
HI-TECH X PRO FOR PIC32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheet

Specifications of SW500011

No. Of User Licenses
1
Supported Families
PIC32
Core Architecture
PIC
Supported Hosts
Windows XP, Vista, Linux, Mac OS X
Software Edition
Professional
Kit Contents
Software And Docs
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
032
778-1007
778-1007
LONGJMP
Synopsis
Description
The longjmp() function, in conjunction with setjmp(), provides a mechanism for non-local goto’s.
To use this facility, setjmp() should be called with a jmp_buf argument in some outer level function.
The call from setjmp() will return 0.
from an inner level of execution. Note however that the function which called setjmp() must still be
active when longjmp() is called. Breach of this rule will cause disaster, due to the use of a stack
containing invalid data. The val argument to longjmp() will be the value apparently returned from
the setjmp(). This should normally be non-zero, to distinguish it from the genuine setjmp() call.
Example
222
To return to this level of execution, longjmp() may be called with the same jmp_buf argument
#include <setjmp.h>
void longjmp (jmp_buf buf, int val)
#include <stdio.h>
#include <setjmp.h>
#include <stdlib.h>
jmp_buf jb;
void
inner (void)
{
}
void
main (void)
{
longjmp(jb, 5);
int i;
Library Functions

Related parts for SW500011