473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

setjump and longjump

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

Thanks,
pal
Dec 27 '07 #1
6 6161

"pal" <ja********@gmail.comwrote in message
news:09**********************************@a35g2000 prf.googlegroups.com...
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.


Dec 27 '07 #2
On Dec 26, 10:51*pm, pal <jayapal...@gmail.comwrote:
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.
Dec 28 '07 #3
st**************@gmail.com wrote:
On Dec 26, 10:51 pm, pal <jayapal...@gmail.comwrote:
>>
Can anybody explain about setjump and longjump functions if u have
time to spend on this.

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?
Dec 28 '07 #4
st**************@gmail.com wrote:
On Dec 26, 10:51 pm, pal <jayapal...@gmail.comwrote:
>hi all,

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

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?

--
Eric Sosman
es*****@ieee-dot-org.invalid
Dec 28 '07 #5
J. J. Farrell said:
st**************@gmail.com wrote:
>On Dec 26, 10:51 pm, pal <jayapal...@gmail.comwrote:
>>>
Can anybody explain about setjump and longjump functions if u have
time to spend on this.

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?
For the same reason that they shouldn't be used in old code. They suck. :-)
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Dec 28 '07 #6
On Dec 28, 2:22*pm, "J. J. Farrell" <j...@bcs.org.ukwrote:
steve.pagliar...@gmail.com wrote:
On Dec 26, 10:51 pm, pal <jayapal...@gmail.comwrote:
Can anybody explain about setjump and longjump functions if u have
time to spend on this.
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?
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.
Dec 29 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Allen | last post by:
Hi all, I have a tree object I'm writing that searches itself using a recursive search. Thing is, I'm wanting to also include the ability to simply transfer execution if I want ("one-way...
14
by: Eric | last post by:
Hi ! I just do not understand how longjmp works.. I read this docs : http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.8.html but I just don't see why the variable value, which the address is ...
4
by: lallous | last post by:
Hello, So far, setjump() was never used in any of my programs... Is it portable? where its usage mostly fits? Was it exception catching mechanism just as exception handling now exist in...
22
by: Nimmi Srivastav | last post by:
Can someone kindly clarify the distinction between long jumps and gotos? Why is one frowned upon and not the other? Is there really any situation where use of longjmp becomes inevitable? A...
8
by: zsilence_is | last post by:
I would like to know if there is any equivelent to the (as) keyword in c# which will try to convert a variable to a specific type and assign it to null if it faild ... (does not throw an excpetion...
31
by: alex.gman | last post by:
Is it me, or does VC++ 2005 produce much better code than GCC? (about twofold difference in the release configuration vs -O3) Has anyone done a comprehensive study?
5
by: manjuscripts | last post by:
how can I handle exceptions in C?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.