From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,7e35f49d4d9340ab,start X-Google-Attributes: gidfc89c,public X-Google-Thread: 109fba,7e35f49d4d9340ab,start X-Google-Attributes: gid109fba,public X-Google-Thread: 1164f8,7e35f49d4d9340ab,start X-Google-Attributes: gid1164f8,public From: Andrew Ellerton Subject: Division by zero crashes on DEC should be avoidable! Date: 1998/03/06 Message-ID: <34FF7719.41C6@ned.dem.csiro.au>#1/1 X-Deja-AN: 331298116 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: The University of Western Australia Newsgroups: comp.sys.dec,comp.lang.c++,comp.unix.programmer Dear All, This is possibly a simple question: On other UNIX platforms the application I have to port to DEC works fine - including handling division by zero with only a warning, presumably using not-a-number (NaN) or INF symbols as the result. Sure, I know it should never try to divide by zero, but it does. However, the C++ code will crash the entire application on the DEC 4.0 version when it divides by zero. Is this solvable by (for example) compiling with a certain switch? Or is there any other way to stop it from crashing, or do I have to resort to modifying the code? Any help most appreciated! Regards, Andrew -- Andrew Ellerton andrewe @ ned.dem.csiro.au Technical Consultant Ph 08 9389 8421 F 08 9389 1906 Currently at CSIRO Mobile 0417 931 858 Division of Exploration and Mining http://www.ned.dem.csiro.au