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=0.1 required=5.0 tests=BAYES_05,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c22608a39b6f5e7b,start X-Google-Attributes: gid103376,public From: Nick Wilson Subject: Dynamic Array Sizing Date: 1999/06/19 Message-ID: <376B1811.666F042@hotmail.com>#1/1 X-Deja-AN: 491316914 Content-Transfer-Encoding: 7bit X-Original-NNTP-Posting-Host: dialin716.picknowl.com.au X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@telstra.net X-Trace: nsw.nnrp.telstra.net 929765858 203.24.77.237 (Sat, 19 Jun 1999 14:17:38 EST) Organization: Customer of Telstra Big Pond Direct MIME-Version: 1.0 NNTP-Posting-Date: Sat, 19 Jun 1999 14:17:38 EST Newsgroups: comp.lang.ada Date: 1999-06-19T00:00:00+00:00 List-Id: Hello, I was wondering if anyone can help me with the following dilema, I have a file containing an variable amount of data that I want to read into an array. My problem is that if I use a dynamic array, eg type Array_Store is array (integer range <>) of boolean; I have to declare an actual array sometime before reading the values into the array, but don't know what size to make the array. I can do two passes of the file, one to see the size, then declare the array in a block and do another pass to read the values into it. My problem comes about when I want to use functions which are externally available outside this package to lookup the array values. In order to do so, I will need to have the funcitons inside the declare block so they can access the array, but this doesn't seem possible ? Is there a nicer way to do the above in ADA to get access to my array from outside the package ? Any help much appreciated, thanks