Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site tekred.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!pyramid!hplabs!tektronix!tekred!joels From: joels@tekred.UUCP (Joel Swank) Newsgroups: net.micro.cbm Subject: Re: Sequential File Help Message-ID: <460@tekred.UUCP> Date: Wed, 5-Mar-86 19:59:42 EST Article-I.D.: tekred.460 Posted: Wed Mar 5 19:59:42 1986 Date-Received: Sat, 8-Mar-86 21:37:16 EST References: <1868@trwrba.UUCP> Organization: Tektronix, Beaverton OR Lines: 23 > > I have a problem when I load a sequential file into an array. It seems > to be a C64 bug. After loading the data from the sequential file into > an array, the program works find for awhile until suddenly, for no > apparently reason, the program stops for 10-20 seconds then continues > as if nothing happened. Sorry, this is not a bug, but a feature. You got the old 'Garbage Collection' wait. This happens whenever string space is used up, or whenever a FRE function is used. BASIC uses up string space from the top of memory down. New strings are allocated out of unused space. When a string is reassigned its old data is just left unused, and new space is allocated. To re-use the old space the string space is compressed leaving only the currently valid strings. It also has to compress to find out how much memory is free. This can be quite anoying. When memory is really full, I have seen compression take 5 minutes, followed by a few seconds of processing, followed by another 5 minute wait, etc. The problem is worse when lots of strings are in use at once (such as string arrays). The problem can be minimized by using as few strings as possible. If it's any consolation, the new improved BASIC in the C-128 has an efficient way of handling this. Joel Swank Tektronix, Redmond, Oregon