Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FLL Library & VFP6
Message
From
28/10/1998 14:59:38
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
27/10/1998 21:40:28
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00149291
Message ID:
00151863
Views:
32
>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!

Not exactly - you roll your own in that case. Say you got a looong string wanting to cut it along "?" marks.

* lcLongString assumed to exist
lcCut=""
do while len lcLongString>0
lcCut=lcCut+left(lcLongString, 128)
lcLongString=subs(lcLongString,129)
for i=1 to words(lcCut,"?")
lcWord=wordnum(lcCut,i,"?")
Do Whatever with lcWord
endfor
lcCut=subs(lcCut, rat("?",lcCut)+1)
endd

Or something along these lines. Of course, this won't be as quick as when we could use MLINE(), but, hey, this is a harder case. OTOH, you can always say
lcLongString=chrtran(lcLongString, "?", " ")
and go the old track, if it surely doesn't contain spaces. Question mark here is taken just a supposed separator, your real separator may be anything else.

>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

Well, the m.m trick is the only thing that stopped me from doing that - it's real alias would probably be Wnnn (nnn for area number), and that'd require at least two additional lines, so I calculated one extra "m" is cheaper :)

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