[Coco] File Size

Robert Emery remery66 at gmail.com
Wed Feb 15 11:59:59 EST 2023


If you cold-boot and ?mem, then load the program (don't run it) and ?mem
again... The difference should be your program size.

-Bob

On Tue, Feb 14, 2023, 10:59 AM coco--- via Coco <coco at maltedmedia.com>
wrote:

> That is what I had tried before asking it failed.
> I think perhaps I need to read record after record counting how many I
> have read so far
> and have an ON ERROR to detect the EOF. Unless anyone has any other
> ideas.
>
> On 2023-02-14 11:04, Allen Huffman via Coco wrote:
> > On Feb 14, 2023, at 9:59 AM, William Astle via Coco
> > <coco at maltedmedia.com> wrote:
> >>
> >> You can also "cheat" it by opening the file in "R" (or "D") mode with
> >> a 1 byte record size, then use LOF() to get the number of records,
> >> then close the file again.
> >>
> >> OPEN "R",#1,"FILE.EXT",1
> >> L=LOF(1)
> >> CLOSE #1
> >>
> >> Which basically makes the Disk Basic ROM do exactly what Allen
> >> described.
> >
> > I retract my answer!
> >
> > As I look through my article draft, I see I discuss LOF! I just didn’t
> > remember. D'oh!
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list