Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text parsing
Message
 
À
03/06/1998 15:08:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00104482
Message ID:
00104607
Vues:
26
>I'm trying to figure out a way to parse tables, not the database
>type but the regular text type, out of plain text. The problem
>is basically where a text file might contain a table of stats or
>data and the algorithm would first of all recognize the text file
>as having one or more tables, and then decide how many columns the
>table has. I was wondering if anybody knows how to go about solving
>this problem. If you do, could you please give me some pointers on
>this?
>
>Thanks in advance.
>
>Regards,
>
>Fred Zhao
>Systems Programmer
>Market News Publishing

Fred,

If the individual columns are delimited by a particular character, there's an easy way to do this using Foxtools. Look at the functions Words() and WordNum().

BTW, the documentation that comes with VFP contains some errata in this area. It says that included in the characters that these functions use to make the return their values is a carriage return (CHR(13)). Actually, it's a line feed (CHR(10)). Corrected information can be found here in the form of the Extended Foxtools Help File available for downloading here at the UT (Code, Syntax & Commands).

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform