Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Write in a file
Message
De
24/04/2010 11:08:05
 
 
À
24/04/2010 09:38:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01461869
Message ID:
01461889
Vues:
98
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"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform