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: g2news2.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!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: Wed, 7 May 2008 17:56:57 -0500 Organization: Jacob's private Usenet server Message-ID: References: <3132e38d-18bb-4890-9cec-31056ac6e3ba@x19g2000prg.googlegroups.com> <12227360.svS57WvVVs@linux1.krischik.com> <8ee4e946-786c-4faa-8c95-f9027083eb4b@p25g2000pri.googlegroups.com> <97217ff4-aaf3-41ed-986c-8b6c0954e112@l28g2000prd.googlegroups.com> <4820a758$0$548$58c7af7e@news.kabelfoon.nl> <95c1de75-7aa0-4f00-bbc4-6f503a3c7aef@b9g2000prh.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1210201035 21516 69.95.181.76 (7 May 2008 22:57:15 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 7 May 2008 22:57:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Xref: g2news2.google.com comp.lang.ada:5740 Date: 2008-05-07T17:56:57-05:00 List-Id: "Adam Beneschan" wrote in message news:95c1de75-7aa0-4f00-bbc4-6f503a3c7aef@b9g2000prh.googlegroups.com... ... > type Ieee_Short_Real is > record > Mantissa_Sign : Mantissa_Sign_Type; > Exponent : Exponent_Type; > Mantissa : Mantissa_Type; > end record; > > (I've omitted the rep clause because I think the one above might work > only for big-endian and not little-endian machines or vice versa, and > I don't feel like figuring it out because I have a cold and my head > hurts enough already.) Sorry about the cold, but if you omit the rep. clause, all of these components are likely to take full bytes and that won't work at all. IF you had given size clauses on all of the modular types AND a pragma Pack on the record, it MIGHT have worked. But given that you need a particular representation, omitting the rep. clause is irrational. (That said, getting it right on both big-endian and little-endian machines is enough to make my head explode. But it's rarely necessary, and certainly isn't in the OP's case.) Randy.