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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: Keith Thompson Subject: Re: Ada and Java. different behaviour. casting long to int problem. Date: 1999/06/22 Message-ID: #1/1 X-Deja-AN: 492726659 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> X-Complaints-To: usenet@nusku.cts.com X-Trace: nusku.cts.com 930096329 19727 198.68.168.21 (23 Jun 1999 00:05:29 GMT) Organization: CTS Network Services NNTP-Posting-Date: 23 Jun 1999 00:05:29 GMT Newsgroups: comp.lang.ada Date: 1999-06-23T00:05:29+00:00 List-Id: Hyman Rosen writes: [...] > 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've always found this wording a bit odd. The way Operand Error is capitalized implies that it's a technical term, but course there's no predefined Ada exception by that name. Presumably they're referring to Constraint_Error (or possibly Numeric_Error if they were using an Ada 83 compiler). Perhaps "Operand Error" is the name of a hardware-level error condition? Also, what does "protected from causing an Operand Error" mean? I *think* it refers to surrounding the operation with a local exception handler, but it's not at all clear from the report (at least to me). Obviously the report wasn't written for an Ada-aware audience (not that it necessarily should have been). -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> One of the great tragedies of ancient history is that Helen of Troy lived before the invention of the champagne bottle.