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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,15206109532cee9d,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-06 07:15:11 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Detecting NaN Date: Mon, 6 Aug 2001 10:09:55 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9km8fm$d3r$1@nh.pace.co.uk> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 997106998 13435 136.170.200.133 (6 Aug 2001 14:09:58 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 6 Aug 2001 14:09:58 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:11354 Date: 2001-08-06T14:09:58+00:00 List-Id: Suppose I'm generating a Not A Number (NaN) in a floating point computation. If I'm using Gnat 3.13p, I'm pretty sure the way to get that detected is with the "-gnato" switch. (I have not tested it yet - someone else's code - but I'm pretty sure the problem is showing up because the code in question is not compiled with overflow checks on.) However, it might be advantageous to leave off the overflow checks and just force a check on the result. I seem to recall that there was an attribute or pragma or some other Ada language mechanism that would force a data item to be evaluated for correctness - say, after reading a record from a file. You might want to force an evaluationt that the language rules don't require until the record is actually accessed. I think that was the context in which I remember the mechanism being employed. Can anybody refresh my memory as to how that was done? Thanks. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution Web: http://www.mcondic.com/