Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the limit to FREAD() a file and search the varia
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Versions des environnements
Visual FoxPro:
FoxPro Dos
Divers
Thread ID:
01151814
Message ID:
01151833
Vues:
29
This message has been marked as the solution to the initial question of the thread.
The FREAD can read up to 64KB at once.
* Open file
lnFH1 = FOPEN("file1.txt", 12)
lcFileText = ""
DO WHILE NOT FEOF(lnFH1)
   lcFileText = lcFileText + FREAD(lnFH1, 2^16-1)
ENDDO
* Close file
= FCLOSE(lnFH1)
? lcStr $ lcFileText
>
>I want to search a string in a file. I FREAD() the file into a memory variable and then "string"$var. A file that is 600598 bytes cannot be searched, I guess this is way under the STD and EXT version limit of FPD of string lengths.
>
>How to go about this problem?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform