comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: quantified expression with empty array?
Date: Fri, 9 Mar 2018 19:40:50 +0100
Date: 2018-03-09T19:40:50+01:00	[thread overview]
Message-ID: <p7ukfj$u1$1@dont-email.me> (raw)
In-Reply-To: <8279f333-07ec-4477-a175-7c033b2424aa@googlegroups.com>

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

  reply	other threads:[~2018-03-09 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 17:15 quantified expression with empty array? Stephen Leake
2018-03-09 18:40 ` Jeffrey R. Carter [this message]
2018-03-09 18:41 ` Niklas Holsti
2018-03-09 21:08 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox