I think there's also a linked list approach using Banks. Since a Bank is a bit o' memory reserved of such-and-such size, you could create a linked lists with Banks. It probably would also need a function or two to manage, but I believe it could be done. (Whether it's a BETTER way of doing, I haven't checked). Start with a new Bank, specifying sufficient memory for the info you need to store in the Bank, and 4 additional bytes (ie an integer) at the end. The last 4 bytes are essentially reserved for storing the handle of the next Bank. Initially, the last 4 bytes will be Null (zero). Then, when you need to add another node in the list, you create a new Bank, and put its handle in that last reserved 4 bytes of the first Bank.
Then, when it's time to go through the list, after getting the initial info from the first Bank, you check the last 4 bytes. If they are other than zero, then those bytes (the second/following Bank's handle) are used to access the info in the following Bank you created. This can be added to indefinitely, as long as you have enough memory.
When you run through the list, if a node is no longer needed, you grab the last 4 bytes of that node's following Bank, and copy them to the last 4 bytes of the previous node, effectively "skipping over" the no-longer-needed node. The Bank thus no longer needed, can be Free'd. Because the handle of the folowing Bank was copied to the previous Bank, the list is maintained. You can always add to the node by adding more Banks.
As an additional sophitication, you could also allocate an initial 4 bytes, to be used to store the Handle of a previous Bank (zero, of course, for the first node). With the handle of the previous Bank in the first 4 bytes of a given Bank, and the handle of a following Bank node (if any) in the last 4 bytes, you can navigate forward and backward through the node list as you please, deleting defunct nodes or inserting new ones.
This is what can be done with Banks. To those who use Types, this procedure using Banks is parallel to what the family of "Type" commands do for you, in taking care of some of the adding/deleting/navigating functions for you, so you don't have to keep track of them.
I think Types are perhaps more versatile than the Banks approach, in that you can have fields that can be any kind of variable, ie floating point, integer, strings, simple arrays, other Types, etc., whereas the Banks are pretty much integer-based (unless you get into using Chr$() functions, which, while possible, would probably be pretty hairy to implement).
But, I just wanted to point out that linked lists CAN be done without using Types.
Then, when it's time to go through the list, after getting the initial info from the first Bank, you check the last 4 bytes. If they are other than zero, then those bytes (the second/following Bank's handle) are used to access the info in the following Bank you created. This can be added to indefinitely, as long as you have enough memory.
When you run through the list, if a node is no longer needed, you grab the last 4 bytes of that node's following Bank, and copy them to the last 4 bytes of the previous node, effectively "skipping over" the no-longer-needed node. The Bank thus no longer needed, can be Free'd. Because the handle of the folowing Bank was copied to the previous Bank, the list is maintained. You can always add to the node by adding more Banks.
As an additional sophitication, you could also allocate an initial 4 bytes, to be used to store the Handle of a previous Bank (zero, of course, for the first node). With the handle of the previous Bank in the first 4 bytes of a given Bank, and the handle of a following Bank node (if any) in the last 4 bytes, you can navigate forward and backward through the node list as you please, deleting defunct nodes or inserting new ones.
This is what can be done with Banks. To those who use Types, this procedure using Banks is parallel to what the family of "Type" commands do for you, in taking care of some of the adding/deleting/navigating functions for you, so you don't have to keep track of them.
I think Types are perhaps more versatile than the Banks approach, in that you can have fields that can be any kind of variable, ie floating point, integer, strings, simple arrays, other Types, etc., whereas the Banks are pretty much integer-based (unless you get into using Chr$() functions, which, while possible, would probably be pretty hairy to implement).
But, I just wanted to point out that linked lists CAN be done without using Types.