From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fee8802cc3d8334d X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Ada and Java. different behaviour. casting long to int problem. Date: 1999/06/17 Message-ID: <3769519B.9B0F880@pwfl.com>#1/1 X-Deja-AN: 490792548 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <7jt2c0$vrb@drn.newsguy.com> <7k57vb$1ipf@drn.newsguy.com> <3766650F.705125B7@pwfl.com> <7k64t7$igo$1@its.hooked.net> <7k689a$ci2@drn.newsguy.com> <3766C842.E1EAB60A@pwfl.com> <3766D1CC.D712895E@itools.symantec.com> <7k8nn5$qcb$1@its.hooked.net> <3767E8A2.EF1A0570@itools.symantec.com> <7k8tv3$3gm@drn.newsguy.com> <7kaa6o$nr3$2@wanadoo.fr> <376906CF.109EEF55@pwfl.com> <7kbaoc$1588@news2.newsguy.com> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1999-06-17T00:00:00+00:00 List-Id: Samuel Mize wrote: > > All true. > > However, the original poster's point was simply that raising an > exception on overflow won't necessarily save the day, or result > in a safer program. > Point taken. I don't think Ariane 5 was an issue of exception raising since they had removed the checks. My recollection was that it had to do with an overflow interrupt which caused the channel to shut down and transfer control to the other side (which was what the design called for.) Still, an interrupt or an exception are similar in intention: Stop doing what you are doing and handle an unusual condition. With the Ariane 5 disaster, the day *might* have been saved if the arithmetic saturated rather than overflowed or wrapped around. Just another example of how a specialized type with specialized behavior may be better in some conditions. > Unfortunately, referring to Ariane on comp.lang.ada is like referring > to "Hitler" in other news groups... > Tell me about it! ;-) I'm afraid I get a bit hypersensitive to the issue because at the time Ariane 5 happened I was building a rocket engine control based on the same processor and programmed in the same language. As a result, there were way too many people wanting to know if we had the same sort of problem. It was *not* one of the more pleasant experiences in my software engineering career. MDC -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 ***To reply, remove "bogon" from the domain name.*** Visit my web page at: http://www.mcondic.com/