comp.lang.ada
 help / color / mirror / Atom feed
From: Pawel Kobylarz <kobylarz@wbkst21.mach.uni-karlsruhe.de>
Subject: Unbounded array
Date: 1999/04/26
Date: 1999-04-26T00:00:00+00:00	[thread overview]
Message-ID: <37247AA2.116F5E00@wbkst21.mach.uni-karlsruhe.de> (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






             reply	other threads:[~1999-04-26  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-26  0:00 Pawel Kobylarz [this message]
1999-04-26  0:00 ` Unbounded array Robert Dewar
1999-04-27  0:00   ` Pawel Kobylarz
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
replies disabled

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