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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,772ddcb41cd06d5b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to check a Float for NaN Date: Thu, 1 May 2008 14:22:35 -0500 Organization: Jacob's private Usenet server Message-ID: References: <3132e38d-18bb-4890-9cec-31056ac6e3ba@x19g2000prg.googlegroups.com> <6f7cd771-16b7-4729-9536-2a7d1c28a9cd@2g2000hsn.googlegroups.com> <93b0d930-102a-4ac4-8b85-48e87d9d3df1@j33g2000pri.googlegroups.com> <48197575$1_1@glkas0286.greenlnk.net> <4819f65b$1_1@glkas0286.greenlnk.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1209669792 26517 69.95.181.76 (1 May 2008 19:23:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 1 May 2008 19:23:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:21165 Date: 2008-05-01T14:22:35-05:00 List-Id: "Stuart" wrote in message news:4819f65b$1_1@glkas0286.greenlnk.net... > "Adam Beneschan" wrote in message > news:fe6a8cc1-eac7-4b25-bd21-39f9c2015c4a@k1g2000prb.googlegroups.com... ... > >> Would not 13.9.2(10) cover this: > >> "disrupting an assignment due to the failure of a language-defined > >> check > >> (see 11.6)" > > > > Did you read 11.6? > > I tried, but legalese is not my first language and I find some of the > 'language lawyerly' stuff rather impenetrable at times. ;-) If either of you can clearly understand and explain 11.6, then you need to join the ARG immediately and explain it to us. ;-) Seriously, 11.6 is a very murky part of the Standard, while everyone understands what is generally intended, its not clear that the wording actually has the right effect in many detailed cases. Nor is it clear exactly what boundaries are correct. It was the best that the Ada 95 team could do, and no one much wants to open the can of worms that it represents. We had a series of lengthy and rather heated discussions about the data validity model in Ada during the Amendment process. We were trying to fix the Ada 95 problem that if an Unchecked_Conversion produces an invalid result, using 'Valid to check that result made your program erroneous (thus, 'Valid could always return True in that case, and in fact at least one compiler did that). We hacked around with the rules to eliminate that particular problem (at the cost of making them much more complex). But we weren't able to completely eliminate the problem (exceptions still can be raised in this case): the problem being one camp that thinks that there should be no checks on Unchecked_Conversion ever and the other camp that will not allow valid objects to become invalid in any circumstances (the alternative being erroneous execution, which is uncalled for for something whose primary purpose is to eliminate checks). We ended up compromising in the middle (I would have preferred to get rid of the erroneousness completely, but at least the current rules don't require an implementer to generate erroneous programs - you can make extra checks to prevent it). Randy.