Re: #pragma cancel_handler





Steve Richter wrote On 11/07/06 14:51,:
Lew Pitcher wrote:

Steve Richter wrote:

Is there an ANSI C or GNU C equivalent to the #pragma cancel_handler
provided in IBM's ILE C compiler?

http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.pgmgd.doc/cpprog436.htm

FWIW, according to the above link, a cancel_handler is a C++ feature.

Since this is comp.lang.C, we don't know about or discuss C++ features.
There certainly won't be an ANSI C equivalent to the #pragma
cancel_handler in ILE C, because that feature is not part of the C
language at all.


yeah, it does say that but I have used it in ILE C and it works as
documented. I dont follow. How does ANSI C handle exceptions?

The same way a fish rides a bicycle.

There are no exceptions in C, hence no handling.

I am
reading about signal handlers in the Linux books I have but none of
them seem to deal with how to implement a try .... finally block.

Not surprising: C has no "try ... finally block," and signals
are not exceptions.

As others have pointed out, you are addressing your question
to the wrong newsgroup. You are asking cooks about calculus, or
mathematicians about marzipan. You may get some answers, but if
I were you I wouldn't pay them much attention -- find a forum
where the people actually know something about your topic and
won't just make wild guesses.

That forum might be comp.lang.c++, as your repeated references
to try/finally suggest you may be writing in that language (maybe
without knowing it). Or if cancel_handler is not a C++ feature
but an IBM-specific extension, maybe you should look for a forum
devoted to IBM-specific topics. If this cancel_handler thing is
as useful and pervasive as you imply, you cannot be the first
person who's tried to find a substitute for it.

But whatever it may be, it's not C.

--
Eric.Sosman@xxxxxxx

.



Relevant Pages

  • Re: #pragma cancel_handler
    ... FWIW, according to the above link, a cancel_handler is a C++ feature. ... cancel_handler in ILE C, because that feature is not part of the C ... How does ANSI C handle exceptions? ...
    (comp.lang.c)
  • Re: #pragma cancel_handler
    ... FWIW, according to the above link, a cancel_handler is a C++ feature. ... cancel_handler in ILE C, because that feature is not part of the C ... finally code block in a C function. ...
    (comp.lang.c)
  • RE: How can you change a recurrence without losing exceptions?
    ... This design error makes recurring appointments nearly useless and is ... rather than making a feature technically reliable. ... "Randy" wrote: ... > exceptions to the changes will be lost. ...
    (microsoft.public.outlook.calendaring)
  • Re: Me-262 Two-Seater
    ... but you do not have permission to use this feature. ... I have posted hundreds of forum photos and very few people ... AHF does put up a hotlink block, but only after so many hits on the ... I am no longer posting LEMB links, but will try to re-track the ...
    (rec.aviation.military)
  • Re: Math help Forum
    ... > We have started a new Math Help Comunity on the web. ... > help you with Homework and projects. ... Why not use THIS forum? ... What feature or improvement do ...
    (sci.math)