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,b1208117d36fb121 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-16 20:11:58 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: System.Address'Size - not a static integer expression? Date: 16 Apr 2002 20:11:57 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0204161911.687f3144@posting.google.com> References: <665e587a.0203060957.3682edf7@posting.google.com> <7f1fa3aa.0203081034.12a7bd11@posting.google.com> <3C891463.C4C09795@despammed.com> <5ee5b646.0204072057.48d33742@posting.google.com> <3CB1B473.CF6E93AD@despammed.com> <5ee5b646.0204091754.5dcfd16d@posting.google.com> <3CB47947.466E0E81@despammed.com> <5ee5b646.0204121220.606ecc36@posting.google.com> <3CB74D37.973A4C19@despammed.com> <5ee5b646.0204141201.1ffab2d8@posting.google.com> <3CBAEE01.D17C2DB0@despammed.com> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1019013118 12341 127.0.0.1 (17 Apr 2002 03:11:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 17 Apr 2002 03:11:58 GMT Xref: archiver1.google.com comp.lang.ada:22626 Date: 2002-04-17T03:11:58+00:00 List-Id: Wes Groleau wrote in message news:<3CBAEE01.D17C2DB0@despammed.com>... > I do not recall ever posting that it was a record > type. Just that it was rejected and that I found > (or my faulty memory says I found) something saying > 'Size was non-static. The same memory does not think > it was a record type. Well this thread was started by a note about a record type. We really can't deal with Wes' vague memory that there was a problem with a 'Size reference that he is sure APEX and GNAT were wrong to reject, but he can't remember exactly what it was :-) > 'Size DOES return a scalar. Therefore, if the prefix > is static and non-scalar, 4.9 (7) says 'Size on it is > static. No, that's not what 4.9(7) says (let's have it again): 7 an attribute_reference that denotes a scalar value, and whose prefix denotes a static scalar subtype; I don't see why you have trouble reading this, it clearly applies ONLY to static scalar subtypes, and thus does NOT apply if the prefix denotes a static non-scalar subtype (the only case of this is a static string subtype and indeed 'Size applied to such a subtype is not static: 1. package t is 2. subtype r is string (1 .. 10); 3. a : constant := r'size; | >>> non-static expression used in number declaration 4. end; This diagostic from GNAT is indeed correct. > That does not prove no other paragraph says > otherwise. You say no, and you are a generally reliable > source. I do not have the time to look for proof that > my memory is not as faulty as you say. Whether you have time or not is irrelevant, there is no such proof, so you will just be wasting your time looking for it. The principles behind this design are quite clear so there are no surprised in the interpretation I am clarifying here. What would be MOST surprising is if there *were* a statement corresponding to your memory, since it is obviously evident that such a statement would be in error, given the fundamental design criteria for the language here. > For now, I have > no doubt or uncertainty, and certainly no fear. So > perhaps FUD is the wrong term. FUD is not what you feel, it is the impression that may be created (gee Ada experts disagree on what the rules of static expressoins are ...). Well they don't disagree, the rules are clear and it is important for Ada programmers to know and understand these rules :-)