Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!husc6!ogccse!blake!ndsuvax!ncsmith From: ncsmith@ndsuvax.UUCP (Timothy Lyle Smith) Newsgroups: comp.lang.pascal Subject: Re: Deleting records from TYPED file Keywords: turbo pascal Message-ID: <2884@ndsuvax.UUCP> Date: 4 Sep 89 22:39:53 GMT References: <833@cbnewse.ATT.COM> Reply-To: ncsmith@ndsuvax.UUCP (Timothy Lyle Smith) Organization: North Dakota State University, Fargo Lines: 18 In article <833@cbnewse.ATT.COM> rtf1@cbnewse.ATT.COM (richard.t.ferber) writes: >I am writing a simple database program in Turbo Pascal (version 5) that >uses a TYPED file to store data records. One of the basic operations I >want the program to do is to delete records in the file (along with add, [stuff about lack of delete operation on TYPEd files] If you are going to be changing the size of the file often it would be quickest to mantain a freelist internal to the file. You could either sacrafice a record to be the head of the list or you could store the head of the list off in a different file. To link you freelist together you could cast a record type containing your link field onto the record that you are unlinking or linking from/to the free list. -- Tim Smith North Dakota State University, Fargo, ND 58105 UUCP: ...!uunet!ndsuvax!ncsmith | 90% of the people on this planet BITNET: ncsmith@ndsuvax.bitnet | are crazy and the rest of us are INTERNET: ncsmith@plains.NoDak.edu | in grave danger of contamination