Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on FileToStr() and ChrTran() functions
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00505649
Message ID:
00505842
Vues:
24
>Irene,
>
>If you use chrtran() to remove characters you can see that the code is running O(n2) which is unsatisfactory for large values of n. strtran() does not suffer from the same flaw:
>
>StrToFile(strtran(FileToStr('c:\tmp\wtbsold.txt'),'"',''),'c:\tmp\wtbsold.txt')
>
>There is a DeQuote() function over on my website that performs even faster that strtran. It's under Samples.
>
>
Nice site, David. I'll place a reference to it in the FAQ here in UT.
I probably have to run some tests comparing your utility with the utility I currently use (thanks to Cetin), when I have time.

The only problem with your site, that it opens in the same IE instance, e.g. I then have to hit Back on my browser to return back to UT. Could you make it open in the new IE instance, please.

Thanks again.


>>I'm using these commands to get rid of the double quotes in a text flat file. The code works accept when the file contains more than +/- 2000 records (lines) the vfox session hangs (NOT RESPONDING). Is there a limit or do I need to include in my code a command that tells vfox to wait until the FileToStr command is done? Please help...
>>
>>The command that causes the programto hang is:
>>StrToFile(chrtran(FileToStr('c:\tmp\wtbsold.txt'),'"',''),'c:\tmp\wtbsold.txt')
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