[Coco] Basic09 Linked Lists

Wayne Campbell asa.rand at gmail.com
Tue May 21 19:23:35 EDT 2019


Why not use the built-in DATA elements. That's a linked list and all you
have to supply is the data. I need to look in the manual to remember the
exact syntax.

Wayne


On Tue, May 21, 2019, 4:13 PM Aaron <manney at gmail.com> wrote:

> Hi all,
>
> I found a snippet of code for a linked list, which is essentially an array
> of `type`s:
>
> TYPE link_pointers = fwd,back: INTEGER
> TYPE element = data: STRING[64]; ptr: link_pointers
> DIM list(100): element
>
> Is this the best way to make a linked list in Basic09?  Or is there a
> better implementation out there?  Ideally, I'd love to use it without
> having to pre-define the length of the array.  But, unless things have
> changed in the last 20 years, I'm aware of the limitations of Basic09.  :)
>
> Thanks.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list