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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada 202x and square brackets Date: Wed, 20 Feb 2019 17:47:51 -0600 Organization: JSA Research & Innovation Message-ID: References: <54a5873a-57aa-40c6-8af4-a6f908d53593@googlegroups.com> Injection-Date: Wed, 20 Feb 2019 23:47:51 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="4119"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:55616 Date: 2019-02-20T17:47:51-06:00 List-Id: "Lucretia" wrote in message news:b773bbfa-9fd0-431a-8ff3-462b2c5ccd15@googlegroups.com... > On Wednesday, 20 February 2019 14:32:14 UTC, Jere wrote: >> On Tuesday, February 19, 2019 at 5:01:05 PM UTC-5, Lucretia wrote: >> > Hi, >> > >> > I've noticed whilst looking through the grammar of draft 17 there are a >> > lot of new uses of '[' ']' without much explanation. Can someone >> > elaborate? >> > >> > Ta, >> > Luke. >> >> I know you found it, but for other's benefit, which did you find. I >> searched through and found them used in "reduction expressions" [1], >> but I don't know if that was the only use >> >> [1]: http://www.ada-auth.org/standards/2xrm/html/RM-4-5-10.html#I3068 > > It was aggregates for containers, so you can do Set := [1,2,3,4] or > something like that. I didn't read the details. > > http://www.ada-auth.org/standards/2xaarm/html/AA-4-3-5.html You can also use them around array aggregates, so that you can write a single component array aggregate: My_Arr : constant Some_Unconstrained_Array_Type := [1]; Container aggregates are roughly user-defined array aggrgeates. (Alternatively, you can [maybe should] think of an array as a built-in container.) Randy.