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,ab46f8fd8bc30c31 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news2.arglkargh.de!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Problems with Scope of aliased Objects Followup-To: comp.lang.ada Date: Fri, 17 Apr 2009 15:53:24 +0200 Message-ID: <74rfulF152obcU2@mid.individual.net> References: <605b4fb5-2be1-42c7-b8d6-11d0b6098a82@37g2000yqp.googlegroups.com> <7e8384b9-f3eb-473e-bf04-1207c6212799@v35g2000pro.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: individual.net WRVvhx370uKQFClXgmKBAQqj4ud18X/8epHfpPGF4uCP3Id50= Cancel-Lock: sha1:sZi+nV/gILO+z9Q1Lcq2GqXYdCU= User-Agent: KNode/0.99.01 Xref: g2news1.google.com comp.lang.ada:4516 Date: 2009-04-17T15:53:24+02:00 List-Id: patrick.gunia@googlemail.com wrote: > On 16 Apr., 18:01, Adam Beneschan wrote: >> On Apr 16, 8:50 am, Ludovic Brenta wrote: >> >> > Hi Patrick, >> >> > Why don't you pass the outer array as an "in out" parameter to your >> > subprogram and let the subprogram write directly into the array? >> >> I get the impression that the OP wanted an array of class-wide types, >> so this won't work. >> >> -- Adam > > Yes, this is exactly what I need. I´d like to use the elements of the > array for polymorphic methods and the array has to be able to keep > members from different classes within my hierarchie. Thus I won´t have > another option then declaring the array as an array of class-wide > access types. So this part is fixed. In Ludovic´s approach I would > still work with concrete instances of my class, which won´t work for > my structure. You could also use the indefinite vectors from the 2005 standard library, if your compiler has it already. That way you don't need to deal with access types and the heap directly.