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,fea5f9c57f8bf287 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-20 13:55:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Discriminants constraining unconstrained array types Date: 20 Oct 2001 15:55:25 -0500 Organization: LJK Software Message-ID: References: <87g08e9urn.fsf@chiark.greenend.org.uk> <3BD1B6F3.F90883D7@worldnet.att.net> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1003611328 18646 192.135.80.34 (20 Oct 2001 20:55:28 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Sat, 20 Oct 2001 20:55:28 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:14975 Date: 2001-10-20T15:55:25-05:00 List-Id: In article <3BD1B6F3.F90883D7@worldnet.att.net>, James Rogers writes: > type Unconstrained_Type is array(Positive range <>) of Integer; > > type Inadvised_Record_Type (Max : Positive) is record > Buffer : Unconstrained_Type(1..Max); > end record; > > The compiler must identify the size of Inadvised_Record_Type. > The problem arises because the array constraints are determined > at run-time and not at compile-time. The only vaguely reasonable > option for the compiler is to set Buffer'Size equal to > Positive'Last * Integer'Size. Why is that the only reasonable option ?