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=2.2 required=5.0 tests=BAYES_00,FROM_WORDY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b817774a65dfd622 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-29 05:11:02 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!feed2.news.rcn.net!rcn!feed3.news.rcn.net!not-for-mail Reply-To: "Frank J. Lhota" From: "Frank J. Lhota" Newsgroups: comp.lang.ada References: Subject: Re: sizetest.ads:10:28 non-static expression used in number declaration Date: Mon, 29 Mar 2004 08:11:00 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <40682065$0$3043$61fed72c@news.rcn.com> X-Trace: DXC=iTKPi>F^VjALG\V A number declaration must use a static expression. The ARM gives a very strict definition of when a subtype is considered static: it must be a static scalar subtype, or a static string subtype (see 4.9, paragraph 26). Foo, being a record type, is not static. This criteria for static subtypes may seem to be overly strict. It is difficult, however, to devise a more comprehensive definition of static subtype without getting into a lot of complexities. As you have noted, the problem can be avoided by defining Foo_Size to be a constant integer, rather than a named number. The expression used to initialize a constant need not be static. A related issue: enumeration literals are static, but renamed enumeration literals are not. Hence if I declare function Yes return Boolean renames True; then True is static, but Yes is not. Frankly, I find this annoying.