[Coco] RS-DOS: EOF() but for writing?

Christopher R. Hawks chawks at dls.net
Thu Jan 26 15:49:54 EST 2023


On Thu, 26 Jan 2023 14:15:58 -0600
Allen Huffman via Coco <coco at maltedmedia.com> wrote:

> I know you can use EOF() to know if an input file is at the end, but
> is there a way to do the opposite, and know if a write would fail? I
> suppose this is not easy, since it doesn’t know how much you plan to
> write next.
> 
> Without an ON ERROR in CoCo 1/2 BASIC, you would just write until the
> program crashes with a ?DF ERROR (disk full).
> 
> Thoughts?
> 
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227
> (vmail/TXT only) http://www.subethasoftware.com -
> https://www.facebook.com/subethasoftware
> 
> 
> 

Allen:

    AFAIK, disk files are automagally extended until the disk is full.

    You could use FREE(0) , but that will only indicate free granules
(2304 bytes each).


Christopher R. Hawks
HAWKSoft
-- 
The universe does not have laws -- it has habits, and habits can be
broken.
----------------------------------------
       \   ^__^                         
        \  (oo)\_______                 
           (__)\       )\/\           
               ||----w |                
               ||     ||                


More information about the Coco mailing list