[Coco] basic09 - append to file

Aaron Wolfe aawolfe at gmail.com
Tue Jan 11 17:24:05 EST 2011


Thanks.. I tried: SEEK #fp, EOF
that seems to be bad syntax.  there is an EOF() function but that is
boolean, seems to just compare current file pointer to the file size
somehow.  If i could just read the value it is comparing, and use that
as the seek argument, should work.  but, I'm not sure how to get that
value.  I can't really be reading the entire file just to get to the
end, too wasteful of resources for this application.

On Tue, Jan 11, 2011 at 4:50 PM, gene heskett <gheskett at wdtv.com> wrote:
> On Tuesday, January 11, 2011 04:44:19 pm Aaron Wolfe did opine:
>
>> Maybe I'm missing it.. is there an easy way to append to a file (like
>> a log file) in basic09?  all the print,write,put statements seem to
>> write at the current file pointer which is 0 on open.  any trick or
>> simple way to seek to the end?
>>
> I believe one can seek(EOF,#path) or something similar in basic09.  Failing
> that, open in update mode, then read to a throwaway buffer till it hits
> eof, don't close, but start writing at eof.  But that would be a kludge
> only if the seek doesn't work.  ISTR using it with the seek half an eon
> ago. ;-)
>
> --
> Cheers, Gene
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Never raise your hand to your children -- it leaves your midsection
> unprotected.
>                -- Robert Orben
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>



More information about the Coco mailing list