Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FLL Library & VFP6
Message
From
27/10/1998 09:46:55
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
25/10/1998 22:06:33
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00149291
Message ID:
00150925
Views:
36
>>Another thing Words() and WordNum() never liked was the use of memo fields; they had to be converted into strings, even like this: Words(""+the_memo). As for the 256 chars limit, I've always used MLine() to chop long strings. Anyway, counting words in a long strings will probably slow things down, so I preferred chopping 'em regardless of limitation. Good thing about MLine() is that it remembers the end of last line found in the _mline system variable, so for the next line a simple MLine(the_memo, 1, _mline) looks for the next line from _mline offset, which is quick as a fox :).
>
>Mline() - yep, that's fast. I'll test it out on my parser for speed. It works on ordinary strings too, doesn't it?

Doesn't work on dates and logicals :). My code parsers usually look like this:

create cursor mm (m m) && yes, lazy bum gives such a cryptic name
append blank
appe memo m from (lcSourceFile)
_mline=0
do while _mline lcOneLine=mline(m,1,_mline)
do Whatever with lcOneLine
enddo

You may start with something of several kilobytes in length and compare with this for speed. The fastest way to scan a long string I've found so far. You may also watch _mline in the debugger - it always remembers the point it last reached.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform