Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!hp4nl!dutrun!winfave From: winfave@dutrun.UUCP (Alexander Verbraeck) Newsgroups: comp.lang.pascal Subject: Re: Pointers / Linked lists with files.. Summary: 550+ kbytes structure is too large Message-ID: <722@dutrun.UUCP> Date: 14 May 89 12:46:53 GMT References: <5708@cs.Buffalo.EDU> <1389@bucket.UUCP> <3377@westfort.UUCP> Organization: Delft University of Technology, The Netherlands Lines: 31 I suppose you are using Turbo Pascal on a personal computer (because of your use of the string[..] construction). The problem the compiler has with this record construction is that it is awfully large. A quick calculation showed, that the array structure uses more than 550 kbytes of memory. That is more than is available for a structure. The largest possible single structure in Turbo Pascal is 64 kbytes. This means, that one record fits easily in memory ("only" 11 kbytes) but the whole structure does not. I would suggest writing the records to the file one by one. If you need another record, write the one you had currently in memory and read the one you need. If you want to skip to the next "array of records", use a Seek command to position the filepointer into the right position. This means, that you have to use a command like: Seek(file,StructureNumber*50+IndexNumber); The StructureNumber denotes the number of the "total" structure you want to access (the one of 550+ kbytes). The IndexNumber is the index IN the original array[1..50]. I hope this helps... If you have any questions or remarks, please post a reply or mail me directly. --------------------------------------------------------------------- Alexander Verbraeck e-mail: Delft University of Technology winfave@hdetud1.bitnet Department of Information Systems winfave@dutrun.uucp PO Box 356, 2600 AJ The Netherlands ---------------------------------------------------------------------