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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9c9db81a63ddf1fe X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!k10g2000prh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: extended membership tests (branch) Date: Thu, 31 Mar 2011 11:54:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: <247eef65-9ff3-4268-af73-e74d092c1e82@k10g2000prh.googlegroups.com> References: <7dc23d58-4a48-4444-90cd-7f9786b19aad@i14g2000yqe.googlegroups.com> <4d94aba4$0$7656$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301597653 4802 127.0.0.1 (31 Mar 2011 18:54:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 31 Mar 2011 18:54:13 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k10g2000prh.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19599 Date: 2011-03-31T11:54:12-07:00 List-Id: On Mar 31, 9:28=A0am, Georg Bauhaus wrote: > On 31.03.11 16:33, Robert A Duff wrote: > > > Dan writes: > > >> Here's a fun quiz to test your Ada2012 knowledge, based on an > >> observation by Yannick Moy. > > > I won't answer, because I was involved in the discussion with Yannick. > > I can't answer, but started wondering how this will > have to be interpreted: > > =A0 =A0 for b in b1 in b1 .. b1 loop > =A0 =A0 =A0 =A0 null; > =A0 =A0 end loop; See AARM 3.5(3.a). "for b in" has to be followed by either a subtype name, a 'Range attribute, or two "simple expressions" with .. between them. In the last case, the bounds must be "simple expressions", not general expressions. The syntax of simple_expressions doesn't allow membership tests (except in parentheses). So the above is illegal. This rule has been there since Ada 95. -- Adam