Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help me please...
Message
 
À
29/12/1998 11:09:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00171168
Message ID:
00171211
Vues:
34
First, I agree with you that there are times when low-level file I/O makes sense. I said I know of one situation where it probably makes sense. Many people have probably seen situations where it makes sense, that I haven't seen.

But I have used append from even when there's a "header record" and/or "trailer record" in the text file. (Pause to let you laugh.) You just make the field layout of the file you're appending into more flexible, (a few long text fields) rather than reflecting the real field layout. You take the first and/or last records and parse out the header/trailer information and put it where it goes, and delete them (or use scan-for in the next part to ignore them). Then scan the dbf to parse the "real" records into another dbf.

To some it may seem like append-from-then-parse-the-appended-records is more complicated than a low-level FGETS-and-parse-the-string loop. You may say my argument about "more compact code" has gone out the window. But it turns out to be very similar code, with similar complexity to the FGETS loop, and in my experience runs faster. And I love speed ... that's why I use FoxPro ...

Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform