• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Write to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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!"


References: 
 >Re: Write to file (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Fetch 3.0.3
  • Next by Date: global variable not being recognized by script object subroutine
  • Previous by thread: Re: Write to file
  • Next by thread: Re: Re: Write to file
  • Index(es):
    • Date
    • Thread