Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Write in a file
Message
From
24/04/2010 11:08:05
 
 
To
24/04/2010 09:38:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01461869
Message ID:
01461889
Views:
97
This message has been marked as the solution to the initial question of the thread.
>Hi,
>I have created a file with Fcreate , and I would want to write in it . How can I do it.
>help please.
>
>regards
*--Create a new file
lnFileHandle = FCREATE ('myfile.txt') 
*--write text to the file
FWRITE (lnFileHandle, 'This is the text I want to write') 
FWRITE (lnFileHandle, Chr(13))      && with fwrite() you need to send a carriage return if you want it
FWRITE (lnFileHandle, 'This is more text') 
FWRITE (lnFileHandle, Chr(13))   
*--close the file handle (otherwise it will remain locked and inaccessible
FCLOSE (lnFileHandle) 
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform