Bobby Hicks wrote:
> 
> I have a module with some number conversion routines in it.  I bind this
> module to a program.  The procedures or function returns a status value
> signifing success(0), or overflow (3).  If I create a SIGNAL error handler
> and it gets invoked from one of the functions, am I able to set the return
> value?
> ...
> The above function returns 0 if successful, or 3 for overflow.  Is there a
> way to set the return value to 3 if the SIGNAL error get involked.  OR,
> should I be using  catch, try exception handling?
> 

>From your catch/try question, it sounds like you're using C++.  I think
catch/try is probably a better exception-handling mechanism for C++ than
signals.

The ILE C programmer's guide probably has some examples for signal
handling.  You could also google for 
   signal setjmp longjmp example
and find some examples of how to use signals.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.