Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the limit to FREAD() a file and search the varia
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Environment versions
Visual FoxPro:
FoxPro Dos
Miscellaneous
Thread ID:
01151814
Message ID:
01151833
Views:
28
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform