comp.lang.ada
 help / color / mirror / Atom feed
* Unbounded array
@ 1999-04-26  0:00 Pawel Kobylarz
  1999-04-26  0:00 ` Robert Dewar
  0 siblings, 1 reply; 7+ messages in thread
From: Pawel Kobylarz @ 1999-04-26  0:00 UTC (permalink / raw)


I need a data structure that can contain varying amount of items and
provide fast access
through Index.


List has too long access, map is I think too complicated for just a
range of indexes.
I have not found just unbounded array, so maybe it is even too easy to
mention anywhere
or write a special package for it.


In C language, I can declare an array...

      item_type *item_array;

... allocate it in program...

      item_array = alloc(item_size * amount);

... and later change its size:

      item_array = realloc(item_size * new_amount);


Is there in ADA a way to obtain something like unbouned array?

Pawel Kobylarz






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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-26  0:00 Unbounded array Pawel Kobylarz
1999-04-26  0:00 ` Robert Dewar
1999-04-27  0:00   ` Pawel Kobylarz
1999-04-28  0:00     ` Matthew Heaney
1999-04-29  0:00     ` Matthew Heaney
1999-04-29  0:00       ` dennison
1999-04-27  0:00   ` Pawel Kobylarz

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