Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text parsing
Message
 
To
03/06/1998 15:08:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00104482
Message ID:
00104607
Views:
27
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform