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,24d1392c628fdfb6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-12 14:07:30 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3AD618BA.82F2A5D6@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: array References: <5s2B6.32267$ii5.3236241@afrodite.telenet-ops.be> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 12 Apr 2001 21:05:10 GMT NNTP-Posting-Host: 209.86.206.167 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 987109510 209.86.206.167 (Thu, 12 Apr 2001 14:05:10 PDT) NNTP-Posting-Date: Thu, 12 Apr 2001 14:05:10 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Thu, 12 Apr 2001 14:03:56 PDT (newsmaster1.prod.itd.earthlink.net) Xref: supernews.google.com comp.lang.ada:6839 Date: 2001-04-12T21:05:10+00:00 List-Id: Pieter Thysebaert wrote: > > Now I was looking for a function that would allow me to convert the contents > of a tree into an array (and vice versa) > I've found something like arrays with variable range (I mean not fixed at > compile-time) > Well I think that's what I found - does that thing exist ? Certainly, if you have a function function Size (Tree : Tree_Type_Name) return Natural; that returns the number of elements in Tree, you can declare something like type Tree_As_Array is array (Positive range <>) of Tree_Element_Type_Name; and then declare an array of the right size for a specific tree Flat : Tree_As_Array (1 .. Size (Tree) ); and then somehow extract the elements of Tree into the components of Flat. I'm not sure if this answers your question or not. -- Jeff Carter "English bed-wetting types." Monty Python & the Holy Grail