comp.lang.ada
 help / color / mirror / Atom feed
From: Nick Wilson <snow_moose@hotmail.com>
Subject: Dynamic Array Sizing
Date: 1999/06/19
Date: 1999-06-19T00:00:00+00:00	[thread overview]
Message-ID: <376B1811.666F042@hotmail.com> (raw)

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






             reply	other threads:[~1999-06-19  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-19  0:00 Nick Wilson [this message]
1999-06-19  0:00 ` Dynamic Array Sizing jerry
1999-06-19  0:00   ` Matthew Heaney
1999-06-19  0:00     ` jerry
1999-06-20  0:00       ` Matthew Heaney
1999-06-21  0:00         ` jerry
1999-06-19  0:00   ` jerry
1999-06-19  0:00 ` Tom Moran
1999-06-19  0:00 ` Matthew Heaney
1999-06-20  0:00   ` Nick Wilson
1999-06-20  0:00     ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox