Re: Re: Write to file
Re: Re: Write to file
- Subject: Re: Re: Write to file
- From: email@hidden
- Date: Tue, 27 Feb 2001 17:42:21 EST
>
On 2/27/01 9:26 AM, Sander Tekelenburg <email@hidden> wrote:
>
>
>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.
and Michelle Steiner responded
>
Doesn't write reset EOF automatically?
No, and thank goodness. Can you imagine a multi-megabyte text file into the
middle of which you want to write a small string? While it may be useful to
load the entire text file into a variable, work with it, and re-write en
bloc, many times that proves unwieldy, and direct writing to the file is
easier. You don't want to trash half your data doing it that way.
Jeff Baumann
email@hidden
www.linkedresources.com
14 Days, 14 Hours, 36 Minutes
How is it going to end?