[Coco] Disk BASIC - OPEN with append?

William Astle lost at l-w.ca
Tue Dec 30 14:51:17 EST 2014


On 14-12-29 08:22 PM, Allen Huffman wrote:
> Does Disk BASIC have a way to open a sequential file ("O") and append to the end?
>

Appending to a file can be done. However, it's not quite so friendly as 
a "O" file. You can open a file in random ("R" or "D") mode with a 
record size of 1 and use LOF() to get the size of the file. You can then 
use "PUT#" to add data to the end of the file as with any random access 
file.

Since there's no SEEK command, you can't set the file position directly.

You might be able to open the file in input mode, read to EOF, then 
stuff with the FCB directly to switch it to output mode, but that could 
be risky.


More information about the Coco mailing list