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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.58.35.74 with SMTP id f10mr2014159vej.23.1391709787364; Thu, 06 Feb 2014 10:03:07 -0800 (PST) X-Received: by 10.50.79.130 with SMTP id j2mr21321igx.2.1391709787102; Thu, 06 Feb 2014 10:03:07 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!eu.feeder.erje.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!209.85.216.88.MISMATCH!f11no13158545qae.1!news-out.google.com!vg8ni15igb.0!nntp.google.com!c10no11200907igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 6 Feb 2014 10:03:06 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Need help for constrained type From: adambeneschan@gmail.com Injection-Date: Thu, 06 Feb 2014 18:03:07 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:18403 Date: 2014-02-06T10:03:06-08:00 List-Id: On Thursday, February 6, 2014 9:30:32 AM UTC-8, Niklas Holsti wrote: > (If you want to allow an empty Usage_Info, indexed 0..-1 for example, > you must of course declare Memory_Block.last using some range which > includes negative numbers, for example Integer.) That actually isn't true. The bounds of an empty range do *not* need to be= within the subrange. Here, Natural is a subrange 0 .. Integer'Last, but I= nteger is the base type, and as long as the bounds belong to the base type,= it's OK. (Another example: String is declared as array (Positive range <>= ) of Character, but String(1..N) is fine even if N=3D0, and I'm sure we've = all done that.) -- Adam