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: a07f3367d7,e276c1ed16429c03 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!rz.uni-karlsruhe.de!news.belwue.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 13 Oct 2010 16:51:19 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada is getting more popular! References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4cb5c768$0$6764$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 13 Oct 2010 16:51:20 CEST NNTP-Posting-Host: e9ff2fe8.newsspool3.arcor-online.net X-Trace: DXC=;`FhAClZ5O:T2Rfi6:Lh>_cHTX3j=L9SB54Z2=@7 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:15477 Date: 2010-10-13T16:51:20+02:00 List-Id: On 13.10.10 14:07, ramon_garcia wrote: > type my_container(counter: integer, discriminated_attribute: integer) > is record > data: array(0..counter) of contained(discriminated_attribute); > end record; > > This straightforward way is not posible because one cannot use an > anonymous array type inside a record (by the way, I find this feature > unjustified). I think it's justified insofar as you can't have both separate compilation and dope-free representation of My_Container. procedure P(Simple : in out My_Container) is -- Problem: what's the address of Simple.Data(N) -- in case there are no dope vectors? Stuff : aliased constant My_Container(42, 27); for Stuff'Address use ...; type My_Container_Ptr is access My_Container; Other_Stuff : My_Container_Ptr; begin Other_Stuff := new My_Container (Counter => Input_Func(...), Discriminated_Attribute => Input_Func(...)); end P; Georg