Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Erase tmp.txt
Message
From
16/10/2014 00:46:20
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
16/10/2014 00:16:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609499
Message ID:
01609502
Views:
39
>I was confused by the function of the number at the end of the following code
>
>lcText = "This is my text"
>=STRTOFILE(lcText,'TMP.txt',1)
>
>The 1 retains what is already in the TMP.txt file so that the new text is added to what is already in the TMP.txt text.
>I just discovered that using 0 instead will write the TMP.txt anew effectively erasing the existing TMP.txt
>.... which is what I was after. Sorry the posting was a bit confused - many thanks for your suggestions.
>
>k
>
Well, yes, that was a other problem. :)

Yepp STRTOFILE(,,1) appends, while 0 or no third parameter overwrites.

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform