Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing to a text file
Message
From
18/08/1999 11:12:41
 
 
To
18/08/1999 11:06:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00254904
Message ID:
00255001
Views:
21
>Maybe so, Ed, but I just can't find enough faults with FOPEN, FPUT, et al. to *not* use it when writing a complex, low-level file.
>

I'll not argue that low-level I/O is useful here, but for things that are generated sequentially, concatenating to a string is just as easy. Both approaches are valid, and I'll admit I've got an awful lot more stuff in use that relies on LLIO (mostly because it's all stuff that predates VFP6) than STRTOFILE()

There are significant advantages to using LLIO when you're memory constrained, certainly, since huge memory variables can force VFP to start using the swap file heavily to make more memory available.

Can we leave it as both work; some people are going to find string concatenation easier to understand, while others will be just as happy to use LLIO, even though it requires the use of some features of VFP that they may not understand, and the problem doesn't always require?

>>>Do you mean STRTOFILE()? The reason I went to low-level IO for this problem is that it appears that he's putting labels and data on sequential lines. This could be one doggone big character string.
>>>
>>
>>No big deal here; I've built a humongous (upwards of 9MB) string in VFP6 and then done a STRTOFILE() on it successfully.
>>
>>>
>>>>I'm not sure why you say "only one good way". Filetostr() should handle this very well, and you don't have to keep up with pointer and Low Level Stuff like that. Maybe I'm missing something? As we say here in the South, Splainit to me. :)
>>>>
>>>>Jeff
>>>>
>>>>>Only one good way to do it: Use FCREATE(), FPUTS(), et al...the low level file commands. Very easy and you have total control over the output.
>>>>>
>>>>>
>>>>>>I have to export data from a FoxPro database using VFP 6.0 in an unusual format to a text file. What commands can I use to send hard code as well as my data to the text file? I am currently trying:
>>>>>>
>>>>>>SET ALTERNATE ON
>>>>>>SET ALTERNATE TO &lcfilename ADDITIVE
>>>>>>??'RUNDATE: '
>>>>>>??'OPERATOR: '
>>>>>>
>>>>>>at the beginning of my routine, and it's not working! Any ideas?
>>>>>>
>>>>>>Thanks!!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform