Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending text to low level file
Message
De
01/07/1999 16:42:07
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
01/07/1999 09:32:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00236407
Message ID:
00236705
Vues:
12
>>Hello,
>>I want to create a error log file, but I don't know how to write to a file without loosing the existing text.
>>Is there a easy way to write "additive" to file?
>
>If you use ?/?? for output to a file using SET PRINTER, you can:
>
>SET PRINTER TO File name ADDITIVE
>SET PRINTER ON
>
>You can also use
>
>SET ALTERNATE TO File Name ADDITIVE
>SET ALTERNATE ON
>
>to do the same thing
>
>If you use low-level file I/O, you can use an FOPEN() if the file exists to open the file for output, and then immediately do an FSEEK() to get to the end of file, something like:
>
>nFH = FOPEN('C:\Some\Text\File',12) && open read-write, buffered
>=FSEEK(nFH,0,2) && Move to end of file

And then
_text=nFH

And after this you can use the \ and \\ and Text ... EndText and TextMerge features. BTW, the Set Text To < filename > should also have the Additive clause.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform