From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ccec7cf654f5e8c3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!14bb18d8!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: creating database References: <1115570998.707181.84650@o13g2000cwo.googlegroups.com> From: Matthew Heaney Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 09 May 2005 03:00:03 GMT NNTP-Posting-Host: 24.149.57.125 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1115607603 24.149.57.125 (Sun, 08 May 2005 20:00:03 PDT) NNTP-Posting-Date: Sun, 08 May 2005 20:00:03 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:10959 Date: 2005-05-09T03:00:03+00:00 List-Id: caellumx@yahoo.com writes: > I was thinking of creating the ADT as a record with various fields, > and then an array with each element containing a record. However, I > don't know how many records there'll be so it seems inefficient to > declare an array of a particular size. As someone else already pointed out, you should take a look at the Ada.Container suite. It sounds like you need a set or maybe a map. The latest API is described here: You can find a reference implementation here: gcc 4.0 includes the ada.container library, so you might have it on your system already. I recommend poking around the examples directory for some ideas: I also recommend reading the !examples section that follows the normative section of the AI-302 draft.