www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/28/09:57:14

Date: Wed, 28 Jan 1998 16:19:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Tom Chojnacki <chojnack AT quantum DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: division by 0
In-Reply-To: <34CF2295.7457@quantum.de>
Message-ID: <Pine.SUN.3.91.980128161724.4496E-100000@is>
MIME-Version: 1.0

On Wed, 28 Jan 1998, Tom Chojnacki wrote:

> my program exits and I get "Floating Point exception".
> Is there any way to cause that my program not to stop after
> division by zero.

You need to set the FPU so that FP exception generation in case of such 
illegal operations is disabled.  DJGPP v2 has a function calle 
`_control87' to do that.  I don't know whether v1.x had it.

I would suggest to change your source to not divide by zero in the first 
place, though.  Not every platform will let you get away with this, you 
know.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019