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, T_FILL_THIS_FORM_SHORT autolearn=ham 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-10 04:44:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!lon1-news.nildram.net!peernews!peer.cwci.net!news5-gui.server.ntli.net!ntli.net!news11-gui.server.ntli.net.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: Subject: Re: How would i keep 'records' in ADA ? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Sun, 10 Mar 2002 12:45:34 -0000 NNTP-Posting-Host: 62.253.12.30 X-Complaints-To: abuse@ntlworld.com X-Trace: news11-gui.server.ntli.net 1015764254 62.253.12.30 (Sun, 10 Mar 2002 12:44:14 GMT) NNTP-Posting-Date: Sun, 10 Mar 2002 12:44:14 GMT Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:21015 Date: 2002-03-10T12:45:34+00:00 List-Id: "Jim" wrote in message news:a6e9ko$b6a$1@knossos.btinternet.com... > sorry if i was a little vague. > > say i was creating a database type program eg mail order company - which > holds information such as records of customers :- name, address, tel no. > > i will have a menu like this > > MENU > > a. Add customer details. > b. Delete customer details. > > ----------------- > > i will have to use arrays and records right ? adding customer details is > easy. but deleting, im not sure about. Do i just replace record for that > customer with null statements / space character / junk (anything that gets > rid of the details) or would i have to actually get rid of that element in > the array ? 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