Re: Write to file
Re: Write to file
- Subject: Re: Write to file
- From: Sander Tekelenburg <email@hidden>
- Date: Tue, 27 Feb 2001 18:26:09 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 08:08 -0800 UTC, on 27/02/2001, Michelle Steiner wrote:
>
On 2/27/01 3:56 AM, Rick Plummer <email@hidden> wrote:
>
>
>I need to write data to a file to read back prefs. How can I overwrite the
>
>entire file each time?
>
>
write mydata starting at 0 to file "foo"
Be careful. This will just start writing at the beginning of the file without
any regard for what the file already contains. If the variable "mydata"
happens to contain less data then your file "foo", you'll end up with "foo"
containing your new data, followed by some leftovers.
Use "set eof to 0" to completely wipe the old content, then write to the
file.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBOpvjEusywKfXgqKdEQLagwCg5NpkMXvIUOlxN0zfRlZ+FTsmuOcAn0eu
W4Vd/pdQ+2q06YJHQ0LW57m8
=OJ99
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <
mailto:email@hidden>
Web site at <
http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"