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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7c5529e60468e3e0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-20 09:03:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: generic arrays? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 20 Feb 2004 17:03:26 GMT NNTP-Posting-Host: 63.184.16.87 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1077296606 63.184.16.87 (Fri, 20 Feb 2004 09:03:26 PST) NNTP-Posting-Date: Fri, 20 Feb 2004 09:03:26 PST Xref: archiver1.google.com comp.lang.ada:5695 Date: 2004-02-20T17:03:26+00:00 List-Id: chris wrote: > Is it possible to do something like the following? > > generic > NI : Positive; > package P is > type IV is array (1..NI) of float; > end P; > > generic > type X is ... > package T is > type TP is record > A : X; > end TP; > end T; > > with the ability to make the type of X = type of IV? I want to > instansiate T with IV after instantiating P, but don't know what to make > X. Is there any way to avoid using an access type to hold X in the > record TP? (in the case where type x is an unconstrained array of floats). I must be misunderstanding something, because this seems easy and basic: generic type X is [limited] private; package T is ... with P; with T; procedure W is package New_P is new P (Ni => 10); package New_T is new T (X => New_P.Iv); Q : New_T.Tp; ... -- Jeff Carter "C++ is like jamming a helicopter inside a Miata and expecting some sort of improvement." Drew Olbrich 51