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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Subtype predicates Date: Wed, 24 Aug 2016 17:31:25 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <68b89d71-dd92-4b9c-adb9-476a7caa64cf@googlegroups.com> <8955f6b0-18c6-41b9-91bf-b756189f53db@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 25 Aug 2016 00:31:27 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7c030f56102b58a2c16dea977db88bb"; logging-data="962"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tS3NX4E+Ak4i+1M6zUwXYCDTGkcMQKBA=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 In-Reply-To: <8955f6b0-18c6-41b9-91bf-b756189f53db@googlegroups.com> Cancel-Lock: sha1:7mbBOeqFraLuzYPOHMsEr5ehOAg= Xref: news.eternal-september.org comp.lang.ada:31557 Date: 2016-08-24T17:31:25-07:00 List-Id: On 08/24/2016 05:08 PM, Shark8 wrote: > > Hm, another argument for a 'Type attribute, then we could say > > type Human_Life_Span is range 0 .. 130 > with Default_Value => Human_Life_Span'Type'First; Perhaps. The ARG seem leary of adding features where there's a work around, and you can always say type Human_Life_Span is range 0 .. 130 with Default_Value => 0; If you're worried about Human_Life_Span'First and its default value diverging, you can instead say Human_Life_Span_First : constant := 0; type Human_Life_Span is range Human_Life_Span_First .. 130 with Default_Value => Human_Life_Span_First; -- Jeff Carter "He had no conception of the instrument. He was blowing into it." Take the Money and Run 135