Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FLL Library & VFP6
Message
De
27/10/1998 21:40:28
 
 
À
27/10/1998 09:46:55
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00149291
Message ID:
00151361
Vues:
28
>>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.

Thanks Dragan
What happens though when the data contains no spaces or line feeds. You see I'm parsing some very long HTML parameters which may or may not contain spaces. I was using Words and Wordnum, until IBM's website starting throwing long parameters at me and my cookies got pretty bug too. I think that MLINE will break up the line according to SET MEMOWIDTH, in which case it will wreck my data. And the max setting of MEMOWIDTH is 1024 (used to be lower)
Tricky eh!

And what this "create cursor mm (m m)". Very lazy indeed! ROFL :-). At least you didn't call the cursor "m" so you could have fun finding m.m

Regards
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform