[futurebasic] Re: Array to text file

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : August 1998 : Group Archive : Group : All Groups

From: chatworks@...
Date: Mon, 24 Aug 1998 14:05:39 +0200
Tom Peters writes:
>The text file from the government is in the form of 80 column and 365 rows.
>One row for each day. The tides for a given day are in raw form in the 80
>columns of data. My program currently reads one line at a time parses the
>line of text and outputs the data the way I need it.

Hi Tom,

I have a similar problem with my 'Rotation Sucker' Program: this app reads an
10 MB textfile and extracts information from each line of text. As the length
of the datarecords may vary, it is even a bit more complicated.

Anyhow: to speed up things I recommend reading bigger chunks of the textfile
and use 'FN MUNGER' to find the last carriage return in your handle. Put this
point in a variable, as you will start reading again from this point on from
your input-file.

Now parse through your texthandle. You may use 'FN MUNGER' again to find the
carriage returns and 'BLOCKMOVE' line by line of your handle into stringvars. I
guess that you would be able to continue using all your parsing functions you
wrote already.

Using this technique (and a couple of other tricks) I was able to speed up
'Rotation Sucker' form 1 hour for 10MBs to about 60 seconds for a 10MB file...

As to your question: sorry, I am still fighting with a good system of 'linked
list' of simple records to establish a quick and usable database, so I will
probably not be able to give you the hints you need.

What I would highly recommend is that you buy the two books from Frank Turovich
(available at STAZs) if you can afford them. Frank builds a database-system in
his first book which might be enough for your needs and will get you lots of
input on possible solutions for your current and future programming problems.
After I had read Franks books I finally understood a couple of chapters in the
FB manuals I always skipped because I thought they were to difficult...

If you dont want to buy the books, have a look at the 'STAZ-O-DEX'
sample-program...it might also help you with records, but it does not explain
them.

And: Rick Brown wrote a couple of mails last year passing deep insights to
pointers and handles and their use with FutureBASIC.

chris


 +----------------------------------------------------+
 |      Chris Henkel - mailto:chatworks@...       |
 | http://ourworld.compuserve.com/homepages/chatworks |
 |         [last update august 05th, 1998]            |
 +----------------------------------------------------+


 +----------------------------------------------------+
 | this is Anja and Chris FCserver at home serving... |
 +----------------------------------------------------+