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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.133.88 with SMTP id h85mr28315553iod.90.1514678344834; Sat, 30 Dec 2017 15:59:04 -0800 (PST) X-Received: by 10.157.3.134 with SMTP id f6mr903063otf.3.1514678344666; Sat, 30 Dec 2017 15:59:04 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!i6no4234933itb.0!news-out.google.com!b73ni16164ita.0!nntp.google.com!i6no4234932itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 30 Dec 2017 15:59:04 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.242.254.223; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.242.254.223 References: <053b2370-5c15-4662-a9e3-e1464de206a1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: formal array types and default values From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Sat, 30 Dec 2017 23:59:04 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:49708 Date: 2017-12-30T15:59:04-08:00 List-Id: > If these types are generic formal types, I do not understand what > you mean by "public". Sorry. The array is a public (as opposed to "private" ?) type, T_DEGRE and ELEMENT are formal generic parameters. > Some compilers will allocate the COEF component > on the heap, according to the actual value of Degre, and then will not > have this problem. However, GNAT uses the allocate-maximum-size method.) I would have liked to have the choice, through, say, an aspect Dynamic_Bounds_Checking, or somethin' > The remedy is to place som reasonable upper bound on the maximum > possible value of Degre, by defining the type of Degree with a > reasonable 'Last. It was indeed done initially in the package, but I thought I was smarter and removed it. Wrong... Thanks for your insight.