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/23 Message-ID: <3770EF6C.E2E6FF2C@pwfl.com>#1/1 X-Deja-AN: 492953523 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> <3769519B.9B0F880@pwfl.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-23T00:00:00+00:00 List-Id: Hyman Rosen wrote: > > Nope. Here's the quote from the report > : > > The internal SRI software exception was caused during > execution of a data conversion from 64-bit floating point to > 16-bit signed integer value. The floating point number which > was converted had a value greater than what could be > represented by a 16-bit signed integer. This resulted in an > Operand Error. The data conversion instructions (in Ada code) > were not protected from causing an Operand Error, although > other conversions of comparable variables in the same place in > the code were protected. > I remembered correctly the floating to integer conversion being the problem. However, this text of the report is confusing. Operand_Error is not a standard Ada exception. If an exception were raised, it would have to be done because of checks in the code which, to the best of my recollection and as hinted in this chunk of the report, were removed. So it is not clear to me that what happened here was the result of a runtime check around a statement of the form: "Int := Integer (Flt) ;" but could have possibly been the result of the Mil-Std-1750a generating an interrupt (#4 - Fixed Point Overflow). I'd have to go back and re-read the report to refresh my memory. 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/