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!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Mon, 2 Oct 2017 21:14:00 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <325cf1db-bd9e-4f58-a07b-f297960df269@googlegroups.com> <457e2526-d4b6-4999-8521-64f8b6a0810f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 2 Oct 2017 19:14:05 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="9ec0509d2bf9b504c2a00cbdd51930bf"; logging-data="11898"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DItiNXfpzLT7LxFo9Wmq1IsLHn+jWdUs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 In-Reply-To: <457e2526-d4b6-4999-8521-64f8b6a0810f@googlegroups.com> Content-Language: en-US X-Mozilla-News-Host: news://news.eternal-september.org Cancel-Lock: sha1:ta6NZLpqwMYfaixbE8AX6DJA1Ik= Xref: news.eternal-september.org comp.lang.ada:48284 Date: 2017-10-02T21:14:00+02:00 List-Id: On 10/02/2017 06:23 PM, reinert wrote: > > I thought "x in a..b" was (should be?) short for "a <= x and x <= b" > (where x, a and b are elements in a (strict) linearly ordered set or so). No, "in" checks whether a value is a member of a subtype: value in subtype_name value in Low .. High is shorthand for value in Subtype_Name range Low .. High where Subtype_Name is a scalar subtype. This is itself shorthand for subtype anonymous is Subtype_Name range Low .. High; value in anonymous Note that you can do type T (D : Boolean) is private; subtype TF is T (D => False); subtype TT is T (D => True); V : T (D => Boolean'Value (Get_Line) ); if V in TT then -- Jeff Carter "He nevere yet no vileynye ne sayde In al his lyf unto no maner wight." Canterbury Tales 156