Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!rochester!uhura.cc.rochester.edu!ur-valhalla!galaxy.ee.rochester.edu!davis From: davis@galaxy.ee.rochester.edu (Al Davis) Newsgroups: comp.lang.fortran Subject: Re: Fortran vs C for computations Message-ID: <1443@valhalla.ee.rochester.edu> Date: 6 Sep 88 00:52:29 GMT References: <535@nikhefh.hep.nl> Sender: usenet@valhalla.ee.rochester.edu Reply-To: davis@ee.rochester.edu (Al Davis) Organization: UR Dept. of Electrical Engg, Rochester NY 14627 Lines: 26 J.Vermaseren says.... > float x = -2.0; > z = sqrt(x); > gives back some value. >The better thing would be to have a parameter that can be set by the user >that determines whether an overflow or sqrt of a negative number should be >fatal (with intelligent errormeassage please). Most fortran compilers have >this option. I have never seen a fortran compiler that had this option. They all abort the program with a non-friendly message. Any option that any fortran would have would necessarily be non-portable. C has a function "matherr" that defines how these errors are handled. When an error occurs, it calls matherr. The vendor supplies a default handler, that returns a value, and sets the global variable "errno", etc. If you don't like it, replace it with your own. You have full control. It is portable, standard, and well documented. On another subject, I suspect our postnews doesn't work correctly. Will someone far away please send me mail if you read this? al davis. davis@ee.rochester.edu