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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f12483752dbc412b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-12 05:51:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!newsfeed.icl.net!newspeer.clara.net!news.clara.net!news-x2.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: How would i keep 'records' in ADA ? Date: Mon, 11 Mar 2002 10:39:24 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1015861162 3474 136.170.200.133 (11 Mar 2002 15:39:22 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 11 Mar 2002 15:39:22 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:21115 Date: 2002-03-11T15:39:22+00:00 List-Id: Its also important to ask if it is necessary to maintain the data in some kind of sorted order. A random set of customer records in no particular order would make the suggested technique of marking unused space - or linking together unused space attractive. (Simple and efficient). If the requirement is to be able to list everything in order (alphabetical on customer last name?) then the problem is somewhat different & this technique becomes less useful. If the project is not a class project (wherein you can utilize someone else's code and not be doing something wrong) then its probably easier to make use of one of the many data structure packages available that would provide a linked list. If this is the case, we can probably point you at a few dozen prepackaged solutions... MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "chris.danx" wrote in message news:yyIi8.12364$xO2.961959@news11-gui.server.ntli.net... > > For simplicity use arrays (your just learning, right? So why overcomplicate > things with linked lists, SQL etc? That's just silly). > > Do as T(?) Moran suggested and have some kind of unreasonable name (a name > with '-' at the beginning would be funny peculiar so it's a good choice) to > check for. If it's that name then that record is deleted, or not in use. > > use a function like > > function is_empty (x : in my_record) return boolean is > begin > ... > end is_empty; > > that will check for this condition. > > If you need to save records to a file, you can just walk the array and write > the non-empty items to the file (the type of file depends on the > specification, but a text file is easy to begin with). Reading them from a > file is easier. > > > HTH, > Chris > >