Is it not an fgets moment ?
On 10 Sep 2016, at 13:08, foxdev foxdev@ozemail.com.au wrote:
Problem with mline approach is the minimum length for memline is 8 bytes. -------- Original message --------From: Ted Roche tedroche@gmail.com Date: 10/09/2016 21:41 (GMT+10:00) To: profoxtech@leafe.com Subject: Re: Processing a long character string one character at a time Hi, Joe:
Sorry, but my weekend is pretty full, so I can't answer as thoroughly as I'd like to. String functions in VFP are blazingly fast, but have to be used correctly in ways that aren't always obvious.
CSV with carriage returns inside fields is not CSV, in my not-so-humble opinion. ALL DBMSes have trouble with long text fields.
IAC, check out http://fox.wikis.com/wc.dll?Wiki~StringHandling for some clues. MLINE() and _MLINE against your string variable (I know it says it's about memo fields) is what you want, *I think*, but don't have time to check.
On Sat, Sep 10, 2016 at 1:32 AM, Joe Yoder joe@wheypower.com wrote: I have a routine that processes each character in a file. The file I am working with is over 2 million characters long. I pull it into a memory variable with filetostr and then process each character with the substr command. Apparently substr has problems when dealing with a long string as the process is painfully slow.
I suspect that I will be better off using the low level file routines to read one character at a time but thought maybe someone knows of a way to speed up the approach I am using now.
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]