Re: fexception handling in C





siliconwafer wrote:
> Hi All,
> I am using C on linux and performed a 1/0 operation i.e a divide by
> zero using integer variables/constants.it gives me a floating point
> exceptionand the program terminates.
> I want to access the routine that causes this message to occour and
> want to modify it so that my program continues to run.How is exception
> handling done in C?Is there a try-catch equivalent?
> Any help apriciated.
> Thanks,
> Shekhar

Read up on the signal() function. It allows you to install an
interrupt handler to catch exceptional conditions and handle them as
you need to.

.



Relevant Pages

  • Re: fexception handling in C
    ... >exceptionand the program terminates. ... any signal for division by zero. ... Balmer Consulting ...
    (comp.lang.c)
  • fexception handling in C
    ... zero using integer variables/constants.it gives me a floating point ... exceptionand the program terminates. ...
    (comp.lang.c)
  • Re: fexception handling in C
    ... > zero using integer variables/constants.it gives me a floating point ... > exceptionand the program terminates. ... Rather than try to handle the divide by 0, ...
    (comp.lang.c)