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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Beginning Ada Programming, by Andrew T. Shvets (2020) Date: Fri, 6 Dec 2019 21:29:55 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <87muca3vgd.fsf@nightsong.com> <57d49047-0a61-4d13-8822-d004732a3acc@googlegroups.com> <3b1b248b-43d0-4762-b1f5-1c5460d24c8b@googlegroups.com> <5e222e6c-7afe-4349-ac66-d9b78ca40ec6@googlegroups.com> <27b11294-d628-4118-8328-a4a9a3946937@googlegroups.com> <80bcdfd1-b1e5-4ebf-aa8a-4beaba5ec3c2@googlegroups.com> <60e61003-409d-4bd5-9784-8ddad5942934@googlegroups.com> <4f659af6-c840-4509-9f76-e9a96b547a55@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 6 Dec 2019 20:29:55 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="255dba8a204173ca31bbda2f999c53ca"; logging-data="12854"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19d8retJlJ+hiQ4bvvQjFJoaMVn9miW99w=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 Cancel-Lock: sha1:eX7c2VUKafQojMF/8aHtt2bvkdg= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57674 Date: 2019-12-06T21:29:55+01:00 List-Id: On 12/6/19 7:34 PM, Shark8 wrote: >>> >>> Type Password is new String >>> with Dynamic_Predicate => Password'Length in Minimum_Length..Maximum_Length >>> and (For all C of Password => C in Digit|Upper_Case|Lower_Case|Symbol) >>> and Password(Password'First) Lower_Case; It looks like you left out an "in". I bet the coders among us are having heart attacks about the "inefficiency" of checking the first character twice. I'd be interested in hearing from compiler writers whether their optimizers would optimize that. -- Jeff Carter "Brave Sir Robin ran away." Monty Python and the Holy Grail 59