Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String parsing
Message
 
 
À
09/10/1999 02:04:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00273042
Message ID:
00274617
Vues:
54
Hi Cetin,

Thanks a lot for your response, I continue to learn very usefull information.

>> If I have a different situation - string with less than 40 words but huge table and the string is field value - does my method still be slow than yours?
>>I mean I parse it in scan ... endscan.
>
>
Basically yes. Wordnum() has to make more than one visit to reach the next word (wagons count). But fewer the words time difference would be very little. OTOH if lines to parse are a lot it would collect to make a noticable delay.


BTW, what means OTOH?

>
>>>C sees strings and files as an array of characters. Just what we want :) Array processing is fast. I have two C routines. One parses words delimited with a comma into an array. I use it primarily to parse lists separated by commas such as a fieldlist.
>>
>> Could you extend it to use any Delimiter?
>
>
Yes I could. But I have other fll code doing it. It parses with parameters such as
>-Upper,lower, mixed
>-lTurkishFix or not (Effects a few char)
>-Delimiters
>-Sort or not
>-Unique words or not (ie: a dictionary indexing)

Great. Could you, please, also send me this using my e-mail nosonov@msn.com with example?

I extent you program to use additional parameter Delimiter, compiled it and tested - it works. Although I could not change you program to return number of elements (I changed return type, but may be I need to change declaration of function - I don't know how)

So, I suppose to use this Parser.fll instead of FoxTools.fll and change the code in my apps, that used FoxTool, I beleive it'll save us time.
I appreciate a lot your suggestion. I'll also compare your method with Charlie Schreiner's method and choose the fastest.


>
Yes you can use VC++ 5 or 6.
>6.0 Steps here :
>-New
>-Win32Dynamic link library
>-Empty DLL
>
>-Select Project\Settings
>Under C/C++ Tab
>Select Category "Code Generation"
>Use runtime lib. - Multithreaded DLL
>Calling convention - _fastcall
>
>Under link TAB - Library modules
>Add winapims.lib
>(I copied winapims.lib to lib directory and pro_ext.h to include directory - they are at VFPhome\API dir. Also copy the ocxapi.lib for later usage.)
>If checked UNcheck "Ignore all default libs"
>
>Add or create your source file(s) and build. Rename the DLL with a FLL extension. You're done.
>Cetin



Thanks. It works.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform