Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WordNum() in FoxTools 6.00 still returns 255 chars
Message
From
16/10/1999 14:52:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/10/1999 02:02:02
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00276381
Message ID:
00277286
Views:
21
>>I've done this:
>>
>>string=chrtran(string, tab, cr)
>>n=alines(array, string)
>>for i=1 to n
>> grind(array[i])
>>endfor
>>
>>Furthermore, it seems to be about four times faster this way. Not sure if this is the only thing that influenced the speed, but sure can't complain about the outcome, right?
>
>Hi Dragan, ol' Foxtools buddy :-)
>Ive been using this code in my web backend to parse the stuff coming in. It's a key limit to speed, especially since the "words" can be really big, eg 100K and can contain any characters 0-254, except chr(255) which is the delimiter and and "=" which separates names from values.
>Can you see a faster way??
>(I've cut out the non-essential bits)
>
>* Foxtools Wordnum() and NextWord() cannot resolve words bigger than 255 characters...
>#DEFINE k_DATASEP CHR(255)
>cData= og.cData + k_DATASEP
>nPos= at(k_DATASEP, m.cData)
>do while m.nPos > 0
>	cStr= left(m.cData, m.nPos - 1)
>	cData= substr(m.cData, m.nPos + 1)
>	nPos= at("=", m.cStr)
>	cName= LEFT(m.cStr, m.nPos-1)
>	cValue= SUBSTR(m.cStr, m.nPos+1)
>	STORE m.cValue TO (m.cName) && eg. qty01234= "12" | part="00123"
>	nPos= at(k_DATASEP, m.cData)
>enddo
>
>
>I'm going away again for a few days, and it really works quite well already - so don't waste time on it if you're busy :-)
>Regards


Hi Guys,
This is quite similar to what I and Nadya was talking about in a thread titled "string parsing".
I think using just pure fox or word* functions of foxtools end in a very slow parsing.
I wrote a DLL for the job (parsing of words -defined char sequences- to a file as one word per line). Parsing speed is about 1 Mb/sec on K6-2-333 with 64Mb RAM (getting to a cursor included). I'll send it to you too as soon as I can regain emailing capability :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform