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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,269df2c167555fd6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-27 18:38:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.wirehub.nl!news.stealth.net!24.30.200.2.MISMATCH!news-east.rr.com!news.rr.com!wn2feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3A9C63D2.71FEA6F@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 0x: Re: Representation clause References: <3a95c52f@post.usenet.com> <3A95E095.75B2A248@worldnet.att.net> <3a9621eb$1@pull.gecm.com> <3A974A99.469AE413@worldnet.att.net> <87wvagweck.fsf@deneb.enyo.de> <3A97F419.6E2F075@worldnet.att.net> <3tym6.3352$7e6.1360491@homer.alpha.net> <3A9ABAF9.F3EABF90@worldnet.att.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 28 Feb 2001 02:32:59 GMT NNTP-Posting-Host: 12.74.129.6 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 983327579 12.74.129.6 (Wed, 28 Feb 2001 02:32:59 GMT) NNTP-Posting-Date: Wed, 28 Feb 2001 02:32:59 GMT Organization: AT&T Worldnet Xref: supernews.google.com comp.lang.ada:5326 Date: 2001-02-28T02:32:59+00:00 List-Id: Randy Brukardt wrote: > > Because checking 'Valid does NOT evaluate an invalid representation. > (That is a subtle point.) And creating an invalid representation is > neither a bounded error nor erroneous: it is only the action of > EVALUATING an invalid representation that is an error. > > Thus, creating a value with Unchecked_Conversion and IMMEDIATELY > checking it with 'Valid is perfectly valid Ada code. And any compiler > that raises an exception before doing so is incorrect (and I very much > doubt you'd find one.) Yes, that clearly leads to simpler code than my more heavy-handed approach. I had missed the subtle point that 'Valid does not evaluate the scalar variable. I was attempting to perform an eqivalent determination before converting the data to the scalar type. Thanks for your patience. Jim Rogers Colorado Springs, Colorado USA