[Coco] basic09 - append to file

Darren A mechacoco at gmail.com
Wed Jan 12 10:29:03 EST 2011


On 1/12/11, Robert Gault wrote:
> Aaron Wolfe wrote:
>> SEEK EOF(#fp)
>>
>> returns a syntax error 28, missing path.
>>
>> I've tried:
>>
>> SEEK #fp,EOF(#fp)
>>
>> but this causes a seek to 0, which is not entirely surprising since
>> eof(#fp) returns 0...  am I doing it wrong?
>>
>
> Depends on the length of the file. The second syntax is correct.
>
> Maybe Basic09 has some quirks, so you could try:
>
> A=EOF(#fp)
> SEEK #fp,A
>

---

The EOF function returns a boolean indicating if the end-of-file has
been reached.  Since EOF will likely be returning FALSE in this
situation, your example will just rewind the file pointer.

Darren


SEEK #



More information about the Coco mailing list