Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FLL Library & VFP6
Message
De
27/10/1998 09:46:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/10/1998 22:06:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00149291
Message ID:
00150925
Vues:
34
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform