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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: quantified expression with empty array? Date: Fri, 9 Mar 2018 19:40:50 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <8279f333-07ec-4477-a175-7c033b2424aa@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 9 Mar 2018 18:40:51 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="c7edc9f1b19a195799e6677f73435c7f"; logging-data="961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190OCb+LJ3zbBvToH+QqB7PQrpS9m1Ga/w=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <8279f333-07ec-4477-a175-7c033b2424aa@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:LzaTJ9gn5+Bs8Bxg2aGuy2DW2ys= Xref: reader02.eternal-september.org comp.lang.ada:50913 Date: 2018-03-09T19:40:50+01:00 List-Id: On 03/09/2018 06:15 PM, Stephen Leake wrote: > I ran across this question recently: > > If I have a quantified expression: > > (for some Child of Children => Predicate (Child)) > > what is the value if Children'Length = 0? 4.5.8(9) reads, "If the quantifier is some, the expression is True if the evaluation of any predicate yields True; evaluation of the quantified_expression stops at that point. Otherwise (every predicate has been evaluated and yielded False), the expression is False." As we all learned in school, a parenthetical expression can be discarded without changing the meaning, so this is equivalent to "If the quantifier is some, the expression is True if the evaluation of any predicate yields True; evaluation of the quantified_expression stops at that point. Otherwise, the expression is False." Since no predicate evaluated to True, the expression is False. -- Jeff Carter "To Err is human, to really screw up, you need C++!" Stéphane Richard 63