From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Lower bounds of Strings Date: Fri, 15 Jan 2021 22:10:08 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <1cc09f04-98f2-4ef3-ac84-9a9ca5aa3fd5n@googlegroups.com> <5a249a9a-0b16-431d-8530-3962b25b6498n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 15 Jan 2021 21:10:09 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a383b3a6afada3aab5b096a7b2a73e89"; logging-data="30671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dG/pmV2BVUmbV1/tkk9KPnxWOh4bEf8A=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 Cancel-Lock: sha1:GTD+EW6gwXZ7+pO/OvRR9TFzBEA= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61150 List-Id: On 1/15/21 6:22 PM, Stephen Davies wrote: > On Friday, 15 January 2021 at 15:12:39 UTC, Jeffrey R. Carter wrote: >> subtype S1 is String with Dynamic_Predicate => S1'First = 1; > Like I said before, I want Sliding, not bounds checking. I guess > most Usenet discussion eventually end up going around in circles. Then you would probably prefer the record version. Neither is perfect, but both, with appropriate conversion functions, give you the effect you want with current Ada. -- Jeff Carter "[I]t is more important to make the purpose of the code unmistakable than to display virtuosity. Even storage requirements and execution time are unimportant by comparison ..." Elements of Programming Style 184