Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > Re: VFP9: Parsi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 9 Topic 846 of 861
Post > Topic >>

Re: VFP9: Parsing a String

by "MikeA" <appell@[EMAIL PROTECTED] > Jun 19, 2008 at 05:53 AM

Right - but with ALines you are stuck to only being able to process this 
with a memofield and it won't work on large CSV files.  Also, it won't
work 
if there are CRLF between quotes per my earlier reply.  It can work but I 
personally would probably go with StrTran if  commas and CRLF are not an 
issue and size of the file is less than 16 megs.  Otherwise I think he is 
stuck with either Append From CSV  into a cursor or writing his own
function 
depending on the parameters of the CSV file.

Mike

"Jack Jackson" <jjackson@[EMAIL PROTECTED]
> wrote in message 
news:4arj54djc16qph0gj1m7t11gg7rq89maq2@[EMAIL PROTECTED]
> On Wed, 18 Jun 2008 19:58:06 -0700, Gene Wirchenko <genew@[EMAIL PROTECTED]
>
> wrote:
>
>>     Is there a function for parsing a comma-delimited string into an
>>array of substrings?  I thought there was, but I can not find it in
>>the docs.
>>
>>     Example: "abc,,def,ghi," would return an array of elements:
>>          "abc"
>>          ""
>>          "def"
>>          "ghi"
>>          ""
>>
>>Sincerely,
>>
>>Gene Wirchenko
>>
>>Computerese Irregular Verb Conjugation:
>>     I have preferences.
>>     You have biases.
>>     He/She has prejudices.
>
> ALINES has an option to specify the delimiter in newer versions.
>
> There is also GETWORDNUM and GETWORDCOUNT.
>
> However, you have to be careful about your requirement to get empty
> items.  GETWORDNUM/GETWORDCOUNT ignore empty items - they treat a
> single delimiter the same as multiple delimiters in a row.  I suppose
> that comes from them originally only using space as the delimiter.  I
> think ALINES will keep the empty ones, but you need to check.
 




 9 Posts in Topic:
VFP9: Parsing a String
Gene Wirchenko <genew@  2008-06-18 19:58:06 
Re: VFP9: Parsing a String
Jack Jackson <jjackson  2008-06-18 22:29:17 
Re: VFP9: Parsing a String
"MikeA" <app  2008-06-19 05:53:58 
Re: VFP9: Parsing a String
Gene Wirchenko <genew@  2008-06-19 08:25:38 
Re: Parsing a String
"MikeA" <app  2008-06-19 05:41:53 
Re: Parsing a String
"Olaf Doschke"   2008-06-19 08:23:37 
Re: Parsing a String
"Olaf Doschke"   2008-06-19 08:33:38 
Re: Parsing a String
"MikeA" <app  2008-06-19 06:39:58 
Re: Parsing a String
"Des" <des@[  2008-06-19 08:52:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:43:44 CST 2008.