--- ai05s/ai05-0158-1.txt 2011/01/18 23:14:04 1.13 +++ ai05s/ai05-0158-1.txt 2011/01/23 02:25:19 1.14 @@ -110,21 +110,24 @@ Replace 4.5.2(27) with: -For the evaluation of a membership test whose membership_choice_list has a single membership_choice, -the simple_expression and the membership_choice are evaluated in arbitrary order. +For the evaluation of a membership test using *in* whose membership_choice_list +has a single membership_choice, the simple_expression and the membership_choice +are evaluated in an arbitrary order; the result is the result of the individual +membership test for the membership_choice. + +For the evaluation of a membership test using *in* whose membership_choice_list +has more than one membership_choice, the simple_expression of the membership test +is evaluated first and the result of the operation is equivalent to that of a +sequence consisting of an individual membership test on each membership_choice +combined with the short-circuit control form *or else*. -For the evaluation of a membership test whose membership_choice_list -has more than one membership_choice, the left operand is evaluated first and the -operation is equivalent to a sequence consisting of an individual test on each -membership_choice combined with the short-circuit control form *or else*. +AARM Ramification: This equivalence includes the evaluation of the membership_choices; +evaluation stops as soon as an invididual membership test evaluates to True. Replace 4.5.2(28) with: -A membership test using in yields the result True if any of the individual -tests on the membership_choices of the membership_choice_list yields True. +An *individual membership test* yields the result True if: -An individual membership test yields the result True if: - * The membership_choice is a choice_expression, and the simple_expression is equal to the value of the membership_choice. If the tested type is a record type or a limited type, the test uses the primitive equality for the type; otherwise the test @@ -138,6 +141,12 @@ * {The membership_choice is a subtype_mark, the}[The] tested type... +Add after 4.5.2(32): + +AARM To Be Honest: X not in A | B | C is intended to be exactly equivalent to not +(X in A | B | C), including in the order of evaluation of the simple_expression +and membership_choices. + Replace 4.9(11) [definition of a static expression] a membership test whose simple_expression is a static expression, @@ -299,24 +308,23 @@ For the evaluation of a membership test, the @fa<simple_expression> and the @fa<range> (if any) are evaluated in an arbitrary order. @dby -For the evaluation of a membership test whose @fa<membership_choice_list> has a single -@fa<membership_choice>, the @fa<simple_expression> and the @fa<membership_choice> are -evaluated in arbitrary order. - -For the evaluation of a membership test whose @fa<membership_choice_list> has more than one -@fa<membership_choice>, the @fa<simple_expression> of the membership test is evaluated first -and the operation is equivalent to a sequence consisting of an individual test on each -@fa<membership_choice> combined with the short-circuit control form @b<or else>. +For the evaluation of a membership test using @b<in> whose @fa<membership_choice_list> +has a single @fa<membership_choice>, the @fa<simple_expression> and the @fa<membership_choice> +are evaluated in an arbitrary order; the result is the result of the individual +membership test for the @fa<membership_choice>. + +For the evaluation of a membership test using @b<in> whose @fa<membership_choice_list> +has more than one @fa<membership_choice>, the @fa<simple_expression> of the membership test +is evaluated first and the result of the operation is equivalent to that of a +sequence consisting of an individual membership test on each @fa<membership_choice> +combined with the short-circuit control form @b<or else>. !corrigendum 4.5.2(28) @drepl A membership test using @b<in> yields the result True if: @dby -A membership test using @b<in> yields the result True if any of the individual -tests on the @fa<membership_choice>s of the @fa<membership_choice_list> yields True. - -An individual membership test yields the result True if: +An @i<individual membership test> yields the result True if: @xbullet<The @fa<membership_choice> is a @fa<choice_expression>, and the @fa<simple_expression> is equal to the value of the @fa<membership_choice>. If the tested type is a record type

Questions? Ask the ACAA Technical Agent