Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find and Replace in huge text file
Message
De
27/09/2005 11:54:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01053411
Message ID:
01053492
Vues:
27
You're right. Not hard to handle luckily.
Cetin

>Your code will miss some occurences that happens to be split between two sequential reads.
>
>>Why don't you use fread(), fwrite(). You might have lines over 8192.ie:
>>
>>#define MAXBUFFER 65536
>>lhIn = FOPEN(lcFileIn)
>>lhOut = FCREATE(lcFileOut)
>>DO WHILE NOT FEOF(m.lhIn )
>>  fwrite(m.lhOut,strtran(fread(m.lhIn, MAXBUFFER),'AD00','BR77'),MAXBUFFER)
>>ENDDO
>>FCLOSE(m.lhIn)
>>FCLOSE(m.lhOut)
>>
Ç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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform