>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement