comp.lang.ada
 help / color / mirror / Atom feed
* Dynamic Array Sizing
@ 1999-06-19  0:00 Nick Wilson
  1999-06-19  0:00 ` Tom Moran
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Nick Wilson @ 1999-06-19  0:00 UTC (permalink / 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






^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1999-06-21  0:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-19  0:00 Dynamic Array Sizing Nick Wilson
1999-06-19  0:00 ` Tom Moran
1999-06-19  0:00 ` jerry
1999-06-19  0:00   ` 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 ` Matthew Heaney
1999-06-20  0:00   ` Nick Wilson
1999-06-20  0:00     ` Matthew Heaney

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