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,ae138939b724a2de X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!34g2000pru.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Single element arrays as function parameters Date: Mon, 13 Jun 2011 07:49:55 -0700 (PDT) Organization: http://groups.google.com Message-ID: <432eff12-4b4c-44b3-ae26-fc3468f4ebce@34g2000pru.googlegroups.com> References: <86ei31v43e.fsf@gareth.avalon.lan> 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 1307976597 25149 127.0.0.1 (13 Jun 2011 14:49:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 13 Jun 2011 14:49:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 34g2000pru.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; 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:20761 Date: 2011-06-13T07:49:55-07:00 List-Id: On Jun 11, 5:28=A0am, "Peter C. Chapin" wrote: > On Fri, 10 Jun 2011 22:11:49 +0200, Mart van de Wege wrote: > > > If I look at the language documentation, I'm guessing that this is > > because a single element array does not get recognised as being of type > > MM_Subtype, which is defined as > > > type MM_Subtype is array(Natural range <>) of Possible_MM_Subtype; > > > What *is* the best way to store an attribute which may be either a > > single enumeration element or a list of enumeration elements? > > What about qualifying the aggregate: > > =A0 =A0MM_Subtype'(Dwarf) No, that's still illegal. Since MM_Subtype is an array subtype, (Dwarf) has to have the syntax of an aggregate, which means you still need a named association: MM_Subtype'(1=3D>Dwarf) -- Adam