Stephane Richard wrote:
> Just a quick question about Ada95. Is there such a thing as a Collection
> Object, or an equivalent data structure that would allow me to do the
> following, for example. Either included in Ada, or coded and available somewhere as a
> Create the collection
> TYPE Integer_List IS COLLECTION OF Integer (or something similar).
I'm not sure why you would want to do that. Use Ada's generic packaging, which is
somewhat analogous to C++ templates and Generic Java (PolyJ).
> This_List : Integer_List;
> ThisList.Add 12
> ThisList.Add 24
> ThisList.Delete 2 -- DELETE second element added to the collection.
> and other features to allow to manipulate this list of whichever type I
> choose. In this example it's a list of integers. But it could be a list of
> records, a list of packages (if possible), a list of pretty much anything
> available to the Ada95 Language.
There are several sources of data structure packages in Ada, you can find the Booch
components, or the packages I have used for years at
John (Jack) Beidler, Ph.D., Professor of Computer Science
Computing Sciences Department
University of Scranton
Scranton, PA 18510
- - - - - - - - - - - - - - -
Voice: (570)941-7774 FAX: (570)941-4250
Email: [log in to unmask]