Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why one code works, while other doesn't?
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00466654
Message ID:
00467270
Views:
32
>>>The problem is that I have text files (produced as a result of copy to command). I need these files to not have double quotes as Field separators, e.g. remove all " from these text files. These files could be huge (up to 30MB). Therefore I'm searching for the most efficient way to achieve my goal.
>>
>>Hello, Nadya.
>>
>>Many years ago I had a simmilar problem (I don't remember well, but maybe it was double quotes, too) and I resorted to a little program in C that stripped the file from such character.
>>
>>Anyway, I think that VFP has one of the best speed for string manipulation, so I'm not sure that you can make the process quicker than the test we did.
>>
>>Giving the file size, maybe the memo file approach could be safer. I think there is a given limit to string variables, but if you have one of those 30 Mb files at hand, you can make a test and find out.
>>
>>Good luck!
>
>Hi Martin,
>
> Actually, VFP can handle strings only less than 16MB. I put 5000000 ( < than 5MB) just to be sure. So, for files less than 5MB I use now Memo approach and for other files low-level functions. Anyway, I'm not completely satisfied with the speed. Your on-liner seems to be a little bit faster (difference is about 1 sec.), but Mike warned me, that I can have Memory problems with that.
>
>Anyway, I think C fll should be faster in this case (I'm not 100% sure, though). If you can find this C code and send it to me with the instructions of creating FLL (I did it once with Cetin's code, but it was ~1,5 years ago), I would really appreaciate it.
>
>Thanks in advance.

(Repost with proper handling of HTML tags)...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform