Re: Thanx

new topic     » goto parent     » topic index » view thread      » older message » newer message

>Thanks to you, but your suggestion isn't practical.  I don't write to the
>file, it just exists.  I made it up a long time ago and it just sits there,
>waiting for me to refer to it. That bit about not knowing whether something
>is in it or not is a bit strong -- if I as a human were looking up
>something, I'd know ahead of time whether what I was looking for would be
>there; but the computer isn't human.  You give it bad info, it goes ahead
>and tries to find it.  That is unfortunately all too easy in the project I'm
>working on.  I've found that out the hard way more than once.

I created a lotto pick tracker for a lotto club I manage. At first, I had
data in a sequential file like the following:

"date, numbers, prize, etc."

I had to read the file, then parse it out finding each comma, etc. etc. It
was the kind of file I think you are talking about-- one that just exists
and is needed for data.

I got wise and realized I could save a lot of time if I just read the
database into a sequence then saved it to a NEW file with print(filenum,
database).

In other words, I simply created a new database- SAME DATA, just different
format. Now it is much easier to read from, find from, manipulate, write
to, etc.

I don't think I'm too off base suggesting you take that old file and update
it to a better format.

Later!
ck

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu