Re: Write to file
Re: Write to file
- Subject: Re: Write to file
- From: email@hidden
- Date: Tue, 27 Feb 2001 21:04:55 EST
In a message dated 2/27/01 8:04:50 PM, email@hidden writes:
>
Only if it makes the file grow. Otherwise, Sander is correct. For example,
>
try
>
this:
>
>
set f to open for access file "foo" with write permission
>
write "foobar" to f
>
write "boz" to f starting at 1
>
set c to read f from 1
>
close access f
>
c
>
--> "bozbar"
>
>
File positions with read/write are 1-based, not zero-based, but it considers
>
zero
>
to be a synonym for 1.
Chris (or anyone else),
So then, is there a way to write to a file, beginning from some point, and
'deliberately' set the end of the file?
(Mostly) Pseudocode:
set f to open for access file "foo" with write permission
write "foobar" to f
write "boz" to f starting at 1
set eof of f to (seek file position pointer) -- NOT real code
set c to read f from 1
close access f
c
--> "boz"
Thanks.
Ken Fleisher
email@hidden