setjump and longjump

P

pal

hi all,


Can anybody explain about setjump and longjump functions if u have
time to spend on this.

Thanks,
pal
 
R

Ravishankar S

pal said:
hi all,


Can anybody explain about setjump and longjump functions if u have
time to spend on this.

it is "setjmp" and "longjmp". they provide (among others) a method to do a
non-local goto (goto across functions). any good
C textbook can provide with an example.
 
S

steve.pagliarulo

hi all,

Can anybody explain about setjump and longjump functions if u have
time to spend on this.

Thanks,
pal

setjmp and longjmp are very old and are a primitive a form of
exception handling (conceptually). They definitely should not be used
in new code.
 
J

J. J. Farrell

setjmp and longjmp are very old and are a primitive a form of
exception handling (conceptually). They definitely should not be used
in new code.

Why not?
 
E

Eric Sosman

setjmp and longjmp are very old and are a primitive a form of
exception handling (conceptually). They definitely should not be used
in new code.

They should definitely not be used in most code, but when
they're needed in code new or old, they're the only mechanism
available for the task.

Are you, perhaps, thinking of That Other Language?
 
S

steve.pagliarulo


I should qualify that answer with "unless you have no other choice."
They are simply one of the the biggest hacks ever made. Understanding
the problem might allow suggestions for better solutions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

setjump problem 3
Restarting my program 14
Assigned gotos in standard C 14
setjmp/longjmp 2
Gray Scott model in FEniCS 0
Repairing old device 0
longjump 14
Cannot convert (double) to (double*) 1

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top