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,c1131ea1fcd630a X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: To Initialise or not Date: 1996/05/09 Message-ID: #1/1 X-Deja-AN: 153943279 references: <318508FE.204B@sanders.lockheed.com> <31909E74.1E09@lmtas.lmco.com> <3191E6E3.453@lmtas.lmco.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-05-09T00:00:00+00:00 List-Id: In article <3191E6E3.453@lmtas.lmco.com>, Ken Garlington wrote: >You use Normalize_Scalars with 'Valid to test for uninitialized scalars. >At least, that's the way I would do it! No. You don't check every use of every scalar using 'Valid. The 'Valid attribute is for when you've got some data from outside Ada (hardware, other language,...). >I guess my understand of erroneous (and maybe this is an Ada 83-only >understanding) is that erroneous code pretty much negated _all_ Ada rules. >If you want to reliably detect the results of erroneous code, you have to >step outside the standard, right? That's right. Ada 83 and Ada 95 have the same definition of erroneous -- anything could happen. And that overrides any rule to the contrary. My point was just that if you ask X'Valid? you had better ensure that you're not doing something erroneous in the evaluation of X (which is a danger). >Since I don't generally get to see AIs, I can't comment on them. However, >my (possibly naive) reading of RM95:13.3:39-43 is that I can always cause an >object to use more than the minimum amount of bits. I suspect that there >may not be a _portable_ definition of Size in all cases, but it at least seems >there should be _some_ value that would work for any given compiler. The AI's are publicly available: ftp://sw-eng.falls-church.va.us/public/AdaIC/standards/95com/ada-issues/ And your comments on them are welcome -- send e-mail to the address mentioned at the front of the RM. There will be an ARG meeting in mid-June, by the way. What do you make of 13.1(20)? I think that your belief, that you can always force an implementation to use an extra bit, is wrong. - Bob