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.


Rather than try to handle the divide by 0, why not prevent it? You know
where it's happening, add logic to test the operands and handle the
situation.



Brian
.



Relevant Pages

  • Re: fexception handling in C
    ... > 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. ...
    (comp.lang.c)
  • 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: DataType Conversion Speed
    ... Then divide by zero to conver to percent. ... > - if either field contains a value, that's the discount, ... > Then divide by zero to conver to percent. ...
    (microsoft.public.access.modulesdaovba)
  • Re: fft2 and ifft2 outputs
    ... Dave Robinson ... ./ is this element by element divide? ... whereas correlation requires the conjugation of the second vector. ... The reason that you are getting a divide by zero error is because you ...
    (comp.soft-sys.matlab)